Esempio n. 1
0
 /**
  * Backwards compatibility logic
  *
  * @param string $name
  */
 function __get($name)
 {
     if ($name === 'ok') {
         return $this->sv->isOK();
     } elseif ($name === 'errors') {
         return $this->sv->getErrors();
     }
     throw new Exception("Cannot get '{$name}' property.");
 }
Esempio n. 2
0
 /**
  * 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);
     }
 }