src/mako/common/traits/NamespacedFileLoaderTrait.php
protected function getCascadingFilePaths(string $file, ?string $extension = null, ?string $suffix = null): array
	{
		$paths = [];

		if(strpos($file, '::') === false)
		{
			// No namespace so we'll just have add a single file

			$paths[] = $this->getFilePath($file, $extension, $suffix);
		}
		else
		{
			// Add the namespaced file first

			$paths[] = $this->getFilePath($file, $extension, $suffix);

			// Prepend the cascading file

			[$package, $file] = explode('::', $file);

			$suffix = 'packages' . DIRECTORY_SEPARATOR . $package . (($suffix !== null) ? DIRECTORY_SEPARATOR . $suffix : '');

			array_unshift($paths, $this->getFilePath($file, $extension, $suffix));
		}

		return $paths;
	}
protected function getCascadingFilePaths(string $file, ?string $extension = null, ?string $suffix = null): array
	{
		$paths = [];

		if(strpos($file, '::') === false)
		{
			// No namespace so we'll just have add a single file

			$paths[] = $this->getFilePath($file, $extension, $suffix);
		}
		else
		{
			// Add the namespaced file first

			$paths[] = $this->getFilePath($file, $extension, $suffix);

			// Prepend the cascading file

			[$package, $file] = explode('::', $file);

			$suffix = 'packages' . DIRECTORY_SEPARATOR . $package . (($suffix !== null) ? DIRECTORY_SEPARATOR . $suffix : '');

			array_unshift($paths, $this->getFilePath($file, $extension, $suffix));
		}

		return $paths;
	}
protected function getCascadingFilePaths ( string $ file , ? string $ extension = null , ? string $ suffix = null ) : array { $ paths = [ ] ; if ( strpos ( $ file , '::' ) === false ) { // No namespace so we'll just have add a single file $ paths [ ] = $ this -> getFilePath ( $ file , $ extension , $ suffix ) ; } else { // Add the namespaced file first $ paths [ ] = $ this -> getFilePath ( $ file , $ extension , $ suffix ) ; // Prepend the cascading file [ $ package , $ file ] = explode ( '::' , $ file ) ; $ suffix = 'packages' . DIRECTORY_SEPARATOR . $ package . ( ( $ suffix !== null ) ? DIRECTORY_SEPARATOR . $ suffix : '' ) ; array_unshift ( $ paths , $ this -> getFilePath ( $ file , $ extension , $ suffix ) ) ; } return $ paths ; }
Returns an array of cascading file paths.

@param  string      $file      File name
@param  string|null $extension File extension
@param  string|null $suffix    Path suffix
@return array
Returns an array of cascading file paths .