コード例 #1
0
 public function __set($key, $value)
 {
     // we must have both this and set() per behavior of WireArray::__set()
     // which throws exceptions if attempting to set a property
     if (SelectableOption::isProperty($key)) {
         return $this->setProperty($key, $value);
     }
     return parent::__set($key, $value);
 }
コード例 #2
0
 /**
  * Convert an array of option arrays, to a SelectableOptionArray of SelectableOption objects
  * 
  * @param array $value
  * @return SelectableOptionArray
  * @throws WireException
  * 
  */
 protected function optionsArrayToObjects(array $value)
 {
     $options = new SelectableOptionArray();
     foreach ($value as $o) {
         $option = new SelectableOption();
         foreach ($o as $k => $v) {
             $option->set($k, $v);
         }
         $options->add($option);
     }
     return $options;
 }
コード例 #3
0
ファイル: RO_CheckBoxList.php プロジェクト: alx/rosaveloso
 /**
  * PHP5 type constructor
  */
 function __construct($defaultValue, $label = '', $textBefore = '', $textAfter = '')
 {
     parent::__construct('', $defaultValue, $label, $textBefore, $textAfter);
 }