/** * Add `AdSystem` element to `Ad' element * * @param string $adSystem * @return \Sokil\Vast\Ad\InLine|\Sokil\Vast\Ad\Wrapper */ public function setAdSystem($adSystem) { $adSystemDomElement = $this->domElement->getElementsByTagName('AdSystem')->item(0); if ($adSystemDomElement) { $adSystemDomElement->nodeValue = $adSystem; } else { $adSystemDomElement = $this->domElement->ownerDocument->createElement('AdSystem', $adSystem); $this->domElement->firstChild->appendChild($adSystemDomElement); } return $this; }