PHP Class Puli\Repository\AbstractEditableRepository

Since: 1.0
Author: Bernhard Schussek ([email protected])
Author: Titouan Galopin ([email protected])
Inheritance: extends AbstractRepository, implements Puli\Repository\Api\EditableRepository
Show file Open project: puli/repository Class Usage Examples

Public Methods

Method Description
__construct ( Puli\Repository\Api\ChangeStream\ChangeStream $changeStream = null ) Create the repository.
getVersions ( $path )

Protected Methods

Method Description
clearVersions ( ) Clears the change stream.
removeVersions ( string $path ) Removes all versions of a resource from the change stream.
storeVersion ( Puli\Repository\Api\Resource\PuliResource $resource ) Stores a version of a resource in the change stream.

Method Details

__construct() public method

Create the repository.
public __construct ( Puli\Repository\Api\ChangeStream\ChangeStream $changeStream = null )
$changeStream Puli\Repository\Api\ChangeStream\ChangeStream If provided, the repository will log resources changes in this change stream.

clearVersions() protected method

Clears the change stream.
protected clearVersions ( )

getVersions() public method

public getVersions ( $path )

removeVersions() protected method

Removes all versions of a resource from the change stream.
protected removeVersions ( string $path )
$path string The Puli path.

storeVersion() protected method

Stores a version of a resource in the change stream.
protected storeVersion ( Puli\Repository\Api\Resource\PuliResource $resource )
$resource Puli\Repository\Api\Resource\PuliResource The resource version.