class StubLockBackendAbstract

A stub of the abstract LockBackendAbstract class for testing purposes.

Hierarchy

Expanded class hierarchy of StubLockBackendAbstract

File

core/tests/Drupal/Tests/Core/Lock/StubLockBackendAbstract.php, line 12

Namespace

Drupal\Tests\Core\Lock
View source
class StubLockBackendAbstract extends LockBackendAbstract {
    
    /**
     * {@inheritdoc}
     */
    public function acquire($name, $timeout = 30.0) : bool {
        return TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    public function lockMayBeAvailable($name) : bool {
        throw new \LogicException(__METHOD__ . '() is not implemented.');
    }
    
    /**
     * {@inheritdoc}
     */
    public function release($name) : void {
    }
    
    /**
     * {@inheritdoc}
     */
    public function releaseAll($lockId = NULL) : void {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
LockBackendAbstract::$lockId protected property Current page lock token identifier.
LockBackendAbstract::$locks protected property Existing locks for this page.
LockBackendAbstract::getLockId public function Overrides LockBackendInterface::getLockId
LockBackendAbstract::wait public function Overrides LockBackendInterface::wait
StubLockBackendAbstract::acquire public function Overrides LockBackendInterface::acquire
StubLockBackendAbstract::lockMayBeAvailable public function Overrides LockBackendInterface::lockMayBeAvailable
StubLockBackendAbstract::release public function Overrides LockBackendInterface::release
StubLockBackendAbstract::releaseAll public function Overrides LockBackendInterface::releaseAll

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.