PHP Класс FOF30\Platform\Base\Filesystem

Наследование: implements FOF30\Platform\FilesystemInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$container The component container
$paths array The list of paths where platform class files will be looked for

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

getExt() публичный Метод

Gets the extension of a file name
public getExt ( string $file ) : string
$file string The file name
Результат string The file extension

getFiles() защищенный статический Метод

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
Результат array Associative array, where the `fullpath` key contains the path to the file, and the `classname` key contains the name of the class

scanDirectory() защищенный статический Метод

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
Результат array List of all the files

stripExt() публичный Метод

Strips the last extension off of a file name
public stripExt ( string $file ) : string
$file string The file name
Результат string The file name without the extension

Описание свойств

$container защищенное свойство

The component container
protected $container

$paths защищенное статическое свойство

The list of paths where platform class files will be looked for
protected static array $paths
Результат array