Esempio n. 1
0
 /**
  * Sets the property $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property does not exist.
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'contents':
             $this->properties[$name] = $value;
             break;
         default:
             return parent::__set($name, $value);
             break;
     }
 }
Esempio n. 2
0
 /**
  * Sets the property $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property does not exist.
  * @throws ezcBaseFileNotFoundException
  *         when setting the property with an invalid filename.
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'fileName':
             if (is_readable($value)) {
                 parent::__set($name, $value);
             } else {
                 throw new ezcBaseFileNotFoundException($value);
             }
             break;
         default:
             return parent::__set($name, $value);
             break;
     }
 }