PHP Class Jackalope\Lock\LockManager

Author: D. Barsotti ([email protected])
Inheritance: implements IteratorAggregat\IteratorAggregate, implements PHPCR\Lock\LockManagerInterface
Show file Open project: jackalope/jackalope Class Usage Examples

Protected Properties

Property Type Description
$factory Jackalope\FactoryInterface The jackalope object factory for this object
$locks Contains a list of nodes locks
$objectmanager Jackalope\ObjectManager
$session PHPCR\SessionInterface
$transport Jackalope\Transport\LockingInterface

Public Methods

Method Description
__construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, PHPCR\SessionInterface $session, Jackalope\Transport\LockingInterface $transport ) : LockManager Create the version manager - there should be only one per session.
addLockToken ( $lockToken ) {@inheritDoc}
createLockInfo ( ) {@inheritDoc}
getIterator ( )
getLock ( $absPath ) {@inheritDoc}
getLockTokens ( ) {@inheritDoc}
getSession ( ) : PHPCR\SessionInterface for the locks to get the session to get their root node
holdsLock ( $absPath ) {@inheritDoc}
isLocked ( $absPath ) {@inheritDoc}
lock ( $absPath, $isDeep, $isSessionScoped, $timeoutHint = PHP_INT_MAX, $ownerInfo = null ) {@inheritDoc}
lockWithInfo ( $absPath, PHPCR\Lock\LockInfoInterface $lockInfo ) {@inheritDoc}
logout ( ) The session logout needs to call this so we are able to release any session based locks that where created through this lock manager.
removeLockToken ( $lockToken ) {@inheritDoc}
unlock ( $absPath ) {@inheritDoc}

Method Details

__construct() public method

Create the version manager - there should be only one per session.
public __construct ( Jackalope\FactoryInterface $factory, ObjectManager $objectManager, PHPCR\SessionInterface $session, Jackalope\Transport\LockingInterface $transport ) : LockManager
$factory Jackalope\FactoryInterface An object factory implementing "get" as described in \Jackalope\FactoryInterface
$objectManager Jackalope\ObjectManager
$session PHPCR\SessionInterface
$transport Jackalope\Transport\LockingInterface
return LockManager

addLockToken() public method

{@inheritDoc}
public addLockToken ( $lockToken )

createLockInfo() public method

{@inheritDoc}
public createLockInfo ( )

getIterator() public method

public getIterator ( )

getLock() public method

{@inheritDoc}
public getLock ( $absPath )

getLockTokens() public method

{@inheritDoc}
public getLockTokens ( )

getSession() public method

for the locks to get the session to get their root node
public getSession ( ) : PHPCR\SessionInterface
return PHPCR\SessionInterface

holdsLock() public method

{@inheritDoc}
public holdsLock ( $absPath )

isLocked() public method

{@inheritDoc}
public isLocked ( $absPath )

lock() public method

{@inheritDoc}
public lock ( $absPath, $isDeep, $isSessionScoped, $timeoutHint = PHP_INT_MAX, $ownerInfo = null )

lockWithInfo() public method

Convenience method forwarding to lock()
public lockWithInfo ( $absPath, PHPCR\Lock\LockInfoInterface $lockInfo )
$lockInfo PHPCR\Lock\LockInfoInterface

logout() public method

The session logout needs to call this so we are able to release any session based locks that where created through this lock manager.
public logout ( )

removeLockToken() public method

{@inheritDoc}
public removeLockToken ( $lockToken )

unlock() public method

{@inheritDoc}
public unlock ( $absPath )

Property Details

$factory protected property

The jackalope object factory for this object
protected FactoryInterface,Jackalope $factory
return Jackalope\FactoryInterface

$locks protected property

Contains a list of nodes locks
protected $locks

$objectmanager protected property

protected ObjectManager,Jackalope $objectmanager
return Jackalope\ObjectManager

$session protected property

protected SessionInterface,PHPCR $session
return PHPCR\SessionInterface

$transport protected property

protected LockingInterface,Jackalope\Transport $transport
return Jackalope\Transport\LockingInterface