src/Factory.php
public function create($vastVersion = '2.0')
    {
        $xml = $this->createDomDocument();

        // root
        $root = $xml->createElement('VAST');
        $xml->appendChild($root);

        // version
        $vastVersionAttribute = $xml->createAttribute('version');
        $vastVersionAttribute->value = $vastVersion;
        $root->appendChild($vastVersionAttribute);

        // return
        return new Document($xml);
    }
public function create($vastVersion = '2.0')
    {
        $xml = $this->createDomDocument();

        // root
        $root = $xml->createElement('VAST');
        $xml->appendChild($root);

        // version
        $vastVersionAttribute = $xml->createAttribute('version');
        $vastVersionAttribute->value = $vastVersion;
        $root->appendChild($vastVersionAttribute);

        // return
        return new Document($xml);
    }
public function create ( $ vastVersion = '2.0' ) { $ xml = $ this -> createDomDocument ( ) ; // root $ root = $ xml -> createElement ( 'VAST' ) ; $ xml -> appendChild ( $ root ) ; // version $ vastVersionAttribute = $ xml -> createAttribute ( 'version' ) ; $ vastVersionAttribute -> value = $ vastVersion ; $ root -> appendChild ( $ vastVersionAttribute ) ; // return return new Document ( $ xml ) ; }
Create new VAST document

@param string $vastVersion

@return Document
Create new VAST document