PHP Interface Puli\Repository\Api\ChangeStream\ChangeStream

Since: 1.0
Author: Titouan Galopin ([email protected])
Author: Bernhard Schussek ([email protected])
ファイルを表示 Open project: puli/repository Interface Usage Examples

Public Methods

Method Description
append ( Puli\Repository\Api\Resource\PuliResource $resource ) Stores a new version of a resource.
clear ( ) Removes all contents of the stream.
contains ( string $path ) : boolean Returns whether the stream contains any version for a path.
getVersions ( string $path, Puli\Repository\Api\ResourceRepository $repository = null ) : VersionList Returns all versions of a resource.
purge ( string $path ) Removes all versions stored for a path.

Method Details

append() public method

Stores a new version of a resource.
public append ( Puli\Repository\Api\Resource\PuliResource $resource )
$resource Puli\Repository\Api\Resource\PuliResource The resource to store.

clear() public method

Removes all contents of the stream.
public clear ( )

contains() public method

Returns whether the stream contains any version for a path.
public contains ( string $path ) : boolean
$path string The Puli path.
return boolean Returns `true` if a version can be found and `false` otherwise.

getVersions() public method

Returns all versions of a resource.
public getVersions ( string $path, Puli\Repository\Api\ResourceRepository $repository = null ) : VersionList
$path string The Puli path to look for.
$repository Puli\Repository\Api\ResourceRepository The repository to attach the resources to.
return VersionList The versions of the resource.

purge() public method

Removes all versions stored for a path.
public purge ( string $path )
$path string The Puli path.