PHP Class Themosis\Finder\Finder

Inheritance: implements Themosis\Finder\IFinder
Afficher le fichier Open project: themosis/framework

Protected Properties

Свойство Type Description
$extensions array Allowed file extensions.
$files array $key is the file name or relative path. $value is the file full path.
$paths array List of given/registered paths.

Méthodes publiques

Méthode Description
addPaths ( array $paths ) Register multiple file paths.
find ( string $name ) : string Returns the file path.
getFiles ( ) : array Return a list of found files.
getPaths ( ) : array Return a list of registered paths.

Méthodes protégées

Méthode Description
addPath ( string $key, string $path ) Register a path.
findInPaths ( string $name, array $paths ) : array Look after a file in registered paths.
getPossibleFiles ( string $name ) : array Returns a list of possible file names.

Method Details

addPath() protected méthode

Register a path.
protected addPath ( string $key, string $path )
$key string The file URL if defined or numeric index.
$path string

addPaths() public méthode

Register multiple file paths.
public addPaths ( array $paths )
$paths array

find() public méthode

Returns the file path.
public find ( string $name ) : string
$name string The file name or relative path.
Résultat string

findInPaths() protected méthode

Look after a file in registered paths.
protected findInPaths ( string $name, array $paths ) : array
$name string The file name or relative path.
$paths array Registered paths.
Résultat array

getFiles() public méthode

Return a list of found files.
public getFiles ( ) : array
Résultat array

getPaths() public méthode

Return a list of registered paths.
public getPaths ( ) : array
Résultat array

getPossibleFiles() protected méthode

Returns a list of possible file names.
protected getPossibleFiles ( string $name ) : array
$name string The file name or relative path.
Résultat array

Property Details

$extensions protected_oe property

Allowed file extensions.
protected array $extensions
Résultat array

$files protected_oe property

$key is the file name or relative path. $value is the file full path.
protected array $files
Résultat array

$paths protected_oe property

List of given/registered paths.
protected array $paths
Résultat array