PHP Интерфейс Puli\Repository\Api\EditableRepository

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Наследование: extends Puli\Repository\Api\ResourceRepository
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
add ( string $path, Puli\Repository\Api\Resource\PuliResource | Puli\Repository\Api\ResourceCollection $resource ) Adds a new resource to the repository.
clear ( ) : integer Removes all resources from the repository.
remove ( string $query, string $language = 'glob' ) : integer Removes all resources matching the given query.

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

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

All resources passed to this method must implement {@link PuliResource}.
public add ( string $path, Puli\Repository\Api\Resource\PuliResource | Puli\Repository\Api\ResourceCollection $resource )
$path string The path at which to add the resource.
$resource Puli\Repository\Api\Resource\PuliResource | Puli\Repository\Api\ResourceCollection The resource(s) to add at that path.

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

Removes all resources from the repository.
public clear ( ) : integer
Результат integer The number of resources removed from the repository.

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

Removes all resources matching the given query.
public remove ( string $query, string $language = 'glob' ) : integer
$query string A resource query.
$language string The language of the query. All implementations must support the language "glob".
Результат integer The number of resources removed from the repository.