Example #1
0
 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;
 }
Example #2
0
 /**
  * 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);
 }