Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function __unset($name)
 {
     if (stripos($name, 'client') === 0) {
         if (strcasecmp($name, 'clientId') == 0) {
             throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
         }
         $this->setClientProperty(strtolower($name), null);
     } else {
         return parent::__unset($name);
     }
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  * Magic PHP method. Besides parent logic the method adds magic properties `as{Format}`.
  */
 public function __unset($name)
 {
     if (!parent::hasProperty($name, false) && $this->hasFileAttribute($name)) {
         throw new InvalidCallException('Unsetting file attribute ' . get_class($this->owner) . "::{$name}.");
     }
     parent::__unset($name);
 }