ClassFinder
class ClassFinder (View source)
Provides method for searching class files in the file system.
Methods
__construct()
Creates a new PathFinder instance.
setFileExtensions(array $extensions)
Sets list of dot included file extensions to use for finding files.
string|false
findFile(string $class, array $prefixPaths, array $basePaths = [], bool $useIncludePath = false)
Attempts to find a file for the given class from given paths.
Details
at line 19
__construct()
Creates a new PathFinder instance.
at line 32
setFileExtensions(array $extensions)
Sets list of dot included file extensions to use for finding files.
If no list of extensions is provided, the extension array defaults to just '.php'.
at line 50
string|false
findFile(string $class, array $prefixPaths, array $basePaths = [], bool $useIncludePath = false)
Attempts to find a file for the given class from given paths.
Both lists of paths must be given as arrays with keys indicating the namespace. Empty string can be used for the paths that apply to all Classes. Each value must be an array of paths.