PHP Class Jackalope\Version\VersionHistory

Note: As this extends NodeInterface, foreach still iterates over the children and not over versions. If you want to use a foreach, you can use getAllVersions() to retrieve an iterator over versions.
Inheritance: extends Jackalope\Node
显示文件 Open project: jackalope/jackalope

Protected Properties

Property Type Description
$linearVersions array Cache of the linear versions to only build the list once
$versionLabels array Cache of the version labels.
$versions array Cache of all versions to only build the list once

Public Methods

Method Description
addVersionLabel ( $versionName, $label, $moveLabel ) {@inheritDoc}
getAllFrozenNodes ( ) {@inheritDoc}
getAllLinearFrozenNodes ( ) {@inheritDoc}
getAllLinearVersions ( ) {@inheritDoc}
getAllVersions ( ) {@inheritDoc}
getRootVersion ( ) {@inheritDoc}
getVersion ( $versionName ) {@inheritDoc}
getVersionByLabel ( $label ) {@inheritDoc}
getVersionLabels ( $version = null ) {@inheritDoc}
getVersionableIdentifier ( ) {@inheritDoc}
hasVersionLabel ( $label, $version = null ) {@inheritDoc}
notifyHistoryChanged ( ) Tell the version history that it needs to reload, i.e. after a checkin operation
removeVersion ( $versionName ) {@inheritDoc}
removeVersionLabel ( $label ) {@inheritDoc}

Protected Methods

Method Description
getEventualSuccessors ( PHPCR\Version\VersionInterface $node ) : array Walk along the successors line to get all versions of this node

Private Methods

Method Description
initVersionLabels ( ) This method fetches all version labels, if the cache array is not initialized yet.

Method Details

addVersionLabel() public method

{@inheritDoc}
public addVersionLabel ( $versionName, $label, $moveLabel )

getAllFrozenNodes() public method

{@inheritDoc}
public getAllFrozenNodes ( )

getAllLinearFrozenNodes() public method

{@inheritDoc}

getAllLinearVersions() public method

{@inheritDoc}

getAllVersions() public method

{@inheritDoc}
public getAllVersions ( )

getEventualSuccessors() protected method

According to spec, 3.13.1.4, these are called eventual successors
protected getEventualSuccessors ( PHPCR\Version\VersionInterface $node ) : array
$node PHPCR\Version\VersionInterface the node to get successors from
return array list of VersionInterface

getRootVersion() public method

{@inheritDoc}
public getRootVersion ( )

getVersion() public method

{@inheritDoc}
public getVersion ( $versionName )

getVersionByLabel() public method

{@inheritDoc}
public getVersionByLabel ( $label )

getVersionLabels() public method

{@inheritDoc}
public getVersionLabels ( $version = null )

getVersionableIdentifier() public method

{@inheritDoc}

hasVersionLabel() public method

{@inheritDoc}
public hasVersionLabel ( $label, $version = null )

notifyHistoryChanged() public method

Tell the version history that it needs to reload, i.e. after a checkin operation

removeVersion() public method

{@inheritDoc}
public removeVersion ( $versionName )

removeVersionLabel() public method

{@inheritDoc}
public removeVersionLabel ( $label )

Property Details

$linearVersions protected_oe property

Cache of the linear versions to only build the list once
protected array $linearVersions
return array

$versionLabels protected_oe property

Cache of the version labels.
protected array $versionLabels
return array

$versions protected_oe property

Cache of all versions to only build the list once
protected array $versions
return array