Go to the documentation of this file.
76 if ( $lockStatus->isOK() ) {
99 $wasOk = $this->status->isOK();
100 $this->status->merge( $this->manager->unlockByType( $this->pathsByType ) );
103 $this->status->setResult(
true, $this->status->value );
Class for handling resource locking.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
static release(ScopedLock &$lock=null)
Release a scoped lock and set any errors in the attatched StatusValue object.
array $pathsByType
Map of lock types to resource paths.
static factory(LockManager $manager, array $paths, $type, StatusValue $status, $timeout=0)
Get a ScopedLock object representing a lock on resource paths.
__destruct()
Release the locks when this goes out of scope.
__construct(LockManager $manager, array $pathsByType, StatusValue $status)
merge( $other, $overwriteValue=false)
Merge another status object into this one.
lockByType(array $pathsByType, $timeout=0)
Lock the resources at the given abstract paths.