/** * __set * * @param mixed $propertyName * @param mixed $propertyValue * @throws ezcBaseValueException * If a submitted parameter was out of range or type. * @throws ezcBasePropertyNotFoundException * If a the value for the property options is not an instance of * @return void * @ignore */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'showZeroValue': if (!is_bool($propertyValue)) { throw new ezcBaseValueException($propertyName, $propertyValue, 'bool'); } $this->properties['showZeroValue'] = (bool) $propertyValue; break; default: return parent::__set($propertyName, $propertyValue); } }
/** * __set * * @param mixed $propertyName * @param mixed $propertyValue * @throws ezcBaseValueException * If a submitted parameter was out of range or type. * @throws ezcBasePropertyNotFoundException * If a the value for the property options is not an instance of * @return void * @ignore */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'lastStep': if (!is_null($propertyValue) && (!is_float($propertyValue) || $propertyValue < 0 || $propertyValue > 1)) { throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1'); } $this->properties['lastStep'] = $propertyValue; break; default: return parent::__set($propertyName, $propertyValue); } }
/** * __set * * @param mixed $propertyName * @param mixed $propertyValue * @throws ezcBaseValueException * If a submitted parameter was out of range or type. * @throws ezcBasePropertyNotFoundException * If a the value for the property options is not an instance of * @return void * @ignore */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'angle': if (!is_numeric($propertyValue)) { throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float < 360'); } $reducement = (int) ($propertyValue - $propertyValue % 360); $this->properties['angle'] = (double) $propertyValue - $reducement; break; default: return parent::__set($propertyName, $propertyValue); } }
/** * Constructor * * @param array $options Default option array * @return void * @ignore */ public function __construct(array $options = array()) { parent::__construct($options); $this->properties['outerStep'] = true; }