/** * 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; } } }
/** * 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); }