*/ public array $attrs; /** * @param array $attrs */ public function __construct(string $tag, array $attrs) { $this->tag = $tag; $this->attrs = $attrs; } public function merge(HtmlWrapper $htmlWrapper): void { // override, as we need some consensus $this->tag = $htmlWrapper->tag; // merge, so all necessary are present $this->attrs = array_merge($this->attrs, $htmlWrapper->attrs); } }