コード例 #1
0
ファイル: ScopedLock.php プロジェクト: paladox/mediawiki
 /**
  * Release the locks when this goes out of scope
  */
 function __destruct()
 {
     $wasOk = $this->status->isOK();
     $this->status->merge($this->manager->unlockByType($this->pathsByType));
     if ($wasOk) {
         // Make sure StatusValue is OK, despite any unlockFiles() fatals
         $this->status->setResult(true, $this->status->value);
     }
 }
コード例 #2
0
ファイル: Status.php プロジェクト: MediaWiki-stable/1.26.1
 /**
  * Change operation result
  *
  * @param bool $ok Whether the operation completed
  * @param mixed $value
  */
 public function setResult($ok, $value = null)
 {
     $this->sv->setResult($ok, $value);
 }