Esempio n. 1
0
 /**
  * Construct value
  *
  * Optionally pass a parsed representation of the value.
  * 
  * @param mixed $value 
  * @return void
  */
 public function __construct($value = null)
 {
     parent::__construct($value === null ? $this->defaultValue : $value);
     $subValueClass = $this->getSubValue();
     $subValue = new $subValueClass();
     foreach ($this->value as $key => $value) {
         if ($value === null) {
             $this->value[$key] = $subValue->value;
         }
     }
 }
Esempio n. 2
0
 /**
  * Construct value.
  *
  * Optionally pass a parsed representation of the value.
  * 
  * @param mixed $value 
  */
 public function __construct($value = null)
 {
     parent::__construct($value === null ? $this->defaultValue : $value);
 }