Example #1
0
 /**
  * Sets the option $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property $name is not defined
  * @throws ezcBaseValueException
  *         if $value is not correct for the property $name
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'schema':
             if (!is_file($value) || !is_readable($value)) {
                 throw new ezcBaseValueException($name, $value, 'XML schema file');
             }
             $this->properties[$name] = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Example #2
0
 /**
  * Sets the option $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property $name is not defined
  * @throws ezcBaseValueException
  *         if $value is not correct for the property $name
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'imageDir':
             if (!is_string($value) || !is_dir($value) || !is_writeable($value)) {
                 throw new ezcBaseValueException($name, $value, 'Path to a writeable directory.');
             }
             break;
         default:
             parent::__set($name, $value);
     }
     $this->properties[$name] = $value;
 }
Example #3
0
 /**
  * Sets the option $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property $name is not defined
  * @throws ezcBaseValueException
  *         if $value is not correct for the property $name
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'xmlHeader':
             if (!is_bool($value)) {
                 throw new ezcBaseValueException($name, $value, 'bool');
             }
             $this->properties[$name] = (bool) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Example #4
0
 /**
  * Sets the option $name to $value.
  *
  * @throws ezcBasePropertyNotFoundException
  *         if the property $name is not defined
  * @throws ezcBaseValueException
  *         if $value is not correct for the property $name
  * @param string $name
  * @param mixed $value
  * @ignore
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'indentXml':
             if (!is_bool($value)) {
                 throw new ezcBaseValueException($name, $value, 'bool');
             }
             $this->properties[$name] = (bool) $value;
             break;
         case 'relaxNgSchema':
             $this->properties[$name] = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }