/** * Retrieves a DOMElement which corresponds to this element and all * child properties. This is used to build an entry back into a DOM * and eventually XML text for application storage/persistence. * * @param DOMDocument $doc The DOMDocument used to construct DOMElements * @return DOMElement The DOMElement representing this element and all * child properties. */ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { $element = parent::getDOM($doc, $majorVersion, $minorVersion); if ($this->_videoId !== null) { $element->appendChild($this->_videoId->getDOM($element->ownerDocument)); } if ($this->_username !== null) { $element->appendChild($this->_username->getDOM($element->ownerDocument)); } if ($this->_rating !== null) { $element->appendChild($this->_rating->getDOM($element->ownerDocument)); } return $element; }
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { $element = parent::getDOM($doc, $majorVersion, $minorVersion); if ($this->_duration !== null) { $element->appendChild( $this->_duration->getDOM($element->ownerDocument)); } if ($this->_private !== null) { $element->appendChild( $this->_private->getDOM($element->ownerDocument)); } if ($this->_videoid != null) { $element->appendChild( $this->_videoid->getDOM($element->ownerDocument)); } if ($this->_uploaded != null) { $element->appendChild( $this->_uploaded->getDOM($element->ownerDocument)); } if ($this->_mediacredit != null) { $element->appendChild( $this->_mediacredit->getDOM($element->ownerDocument)); } if ($this->_mediarating != null) { $element->appendChild( $this->_mediarating->getDOM($element->ownerDocument)); } return $element; }