PHP Interface Puli\Repository\Api\EditableRepository

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends Puli\Repository\Api\ResourceRepository
显示文件 Open project: puli/repository Interface Usage Examples

Public Methods

Method Description
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.

Method Details

add() public method

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() public method

Removes all resources from the repository.
public clear ( ) : integer
return integer The number of resources removed from the repository.

remove() public method

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".
return integer The number of resources removed from the repository.