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.
lockByType(array $pathsByType, $timeout=0)
Lock the resources at the given abstract 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.
array $pathsByType
Map of lock types to resource paths.
static release(ScopedLock &$lock=null)
Release a scoped lock and set any errors in the attached StatusValue object.
__construct(LockManager $manager, array $pathsByType, StatusValue $status)
Generic operation result class Has warning/error list, boolean status and arbitrary value.
merge( $other, $overwriteValue=false)
Merge another status object into this one.