コード例 #1
0
ファイル: labeled.php プロジェクト: mediasadc/alba
 /**
  * __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 'labelCount':
             if (!is_numeric($propertyValue) || $propertyValue <= 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int > 1');
             }
             $this->properties['labelCount'] = (int) $propertyValue;
             break;
         default:
             parent::__set($propertyName, $propertyValue);
             break;
     }
 }
コード例 #2
0
 /**
  * __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 'min':
         case 'max':
             if (!is_numeric($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             $this->properties['initialized'] = true;
             break;
         case 'base':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'logarithmicalFormatString':
             $this->properties['logarithmicalFormatString'] = (string) $propertyValue;
             break;
         default:
             parent::__set($propertyName, $propertyValue);
             break;
     }
 }
コード例 #3
0
ファイル: numeric.php プロジェクト: Adeelgill/livehelperchat
 /**
  * __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 'min':
             if (!is_numeric($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float');
             }
             $this->properties['min'] = (double) $propertyValue;
             $this->properties['initialized'] = true;
             break;
         case 'max':
             if (!is_numeric($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float');
             }
             $this->properties['max'] = (double) $propertyValue;
             $this->properties['initialized'] = true;
             break;
         default:
             parent::__set($propertyName, $propertyValue);
             break;
     }
 }
コード例 #4
0
ファイル: date.php プロジェクト: rootfs/robinhood
 /**
  * __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 'startDate':
             $this->properties['startDate'] = (int) $propertyValue;
             break;
         case 'endDate':
             $this->properties['endDate'] = (int) $propertyValue;
             break;
         case 'interval':
             $this->properties['interval'] = (int) $propertyValue;
             $this->properties['initialized'] = true;
             break;
         case 'dateFormat':
             $this->properties['dateFormat'] = (string) $propertyValue;
             break;
         default:
             parent::__set($propertyName, $propertyValue);
             break;
     }
 }