public function toArray() { $res = parent::toArray(); $res = array_merge($res, ['title' => $this->getTitle(), 'fullName' => $this->getFullName(), 'attrs' => $this->attributes()->toArray(), 'children' => $this->children()->toArray()]); return $res; }
/** * KeyValuePair constructor. * * @param string $name * @param string $value * @param bool $canBeShort */ public function __construct($name, $value = '', $canBeShort = false) { parent::__construct($name); $this->setValue($value); $this->setCanBeShort($canBeShort); }