public function __construct($name = null, $value = null) { \tool::fprint("Creating " . get_called_class() . ":{$name}(" . (is_a($value, __CLASS__) ? $value->value : $value) . ")"); parent::__construct(); $this->name = $name; $this->value = is_a($value, __CLASS__) ? $value->value : $value; }
public function __construct($name = null, $content = array()) { \tool::fprint("Creating " . get_called_class() . (count($content) ? " with " . count($content) . " elements" : '')); parent::__construct(); $this->name = $name; $this->content = $content ? (array) $content : array(); }