PHP Class FOF30\Platform\Base\Filesystem

Inheritance: implements FOF30\Platform\FilesystemInterface
Afficher le fichier Open project: akeeba/fof Class Usage Examples

Protected Properties

Свойство Type Description
$container The component container
$paths array The list of paths where platform class files will be looked for

Méthodes publiques

Méthode Description
__construct ( Container $c ) Public constructor.
getExt ( string $file ) : string Gets the extension of a file name
stripExt ( string $file ) : string Strips the last extension off of a file name

Méthodes protégées

Méthode Description
getFiles ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array This method will crawl a starting directory and get all the valid files that will be analyzed by getInstance.
scanDirectory ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array Recursive function that will scan every directory unless it's in the ignore list. Files that aren't in the ignore list are returned.

Method Details

__construct() public méthode

Public constructor.
public __construct ( Container $c )
$c FOF30\Container\Container The component container

getExt() public méthode

Gets the extension of a file name
public getExt ( string $file ) : string
$file string The file name
Résultat string The file extension

getFiles() protected static méthode

Then it organizes them into an associative array.
protected static getFiles ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array
$path string Folder where we should start looking
$ignoreFolders array Folder ignore list
$ignoreFiles array File ignore list
Résultat array Associative array, where the `fullpath` key contains the path to the file, and the `classname` key contains the name of the class

scanDirectory() protected static méthode

Recursive function that will scan every directory unless it's in the ignore list. Files that aren't in the ignore list are returned.
protected static scanDirectory ( string $path, array $ignoreFolders = [], array $ignoreFiles = [] ) : array
$path string Folder where we should start looking
$ignoreFolders array Folder ignore list
$ignoreFiles array File ignore list
Résultat array List of all the files

stripExt() public méthode

Strips the last extension off of a file name
public stripExt ( string $file ) : string
$file string The file name
Résultat string The file name without the extension

Property Details

$container protected_oe property

The component container
protected $container

$paths protected_oe static_oe property

The list of paths where platform class files will be looked for
protected static array $paths
Résultat array