PHP Класс JamesMoss\Flywheel\NestedRepository

Наследование: extends Repository
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( $name, Config $config )
delete ( $id )
getAllFiles ( ) : array Get an array containing the path of all files in this repository
getFilename ( string $id ) : string Gets just the filename for a document based on it's ID.
getPathForDocument ( string $id ) : string Get the filesystem path for a document based on it's ID.

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

Метод Описание
getFilesRecursive ( $dir, array &$result, $ext )
getIdFromPath ( $path, $ext )
isNestedId ( $id )
validateId ( string $id ) : boolean Checks to see if a document ID is valid
write ( $path, $contents )

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

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

public __construct ( $name, Config $config )
$config Config

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

public delete ( $id )

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

Get an array containing the path of all files in this repository
public getAllFiles ( ) : array
Результат array An array, item is a file path.

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

Gets just the filename for a document based on it's ID.
public getFilename ( string $id ) : string
$id string The ID of the document.
Результат string The filename of the document, including extension.

getFilesRecursive() защищенный Метод

protected getFilesRecursive ( $dir, array &$result, $ext )
$result array

getIdFromPath() защищенный Метод

protected getIdFromPath ( $path, $ext )

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

Get the filesystem path for a document based on it's ID.
public getPathForDocument ( string $id ) : string
$id string The ID of the document.
Результат string The full filesystem path of the document.

isNestedId() защищенный Метод

protected isNestedId ( $id )

validateId() защищенный Метод

Checks to see if a document ID is valid
protected validateId ( string $id ) : boolean
$id string The ID to check
Результат boolean True if valid, otherwise false

write() защищенный Метод

protected write ( $path, $contents )