예제 #1
0
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     foreach ($this->_author as $author) {
         $element->appendChild($author->getDOM($element->ownerDocument));
     }
     foreach ($this->_category as $category) {
         $element->appendChild($category->getDOM($element->ownerDocument));
     }
     foreach ($this->_contributor as $contributor) {
         $element->appendChild($contributor->getDOM($element->ownerDocument));
     }
     if ($this->_id != null) {
         $element->appendChild($this->_id->getDOM($element->ownerDocument));
     }
     foreach ($this->_link as $link) {
         $element->appendChild($link->getDOM($element->ownerDocument));
     }
     if ($this->_rights != null) {
         $element->appendChild($this->_rights->getDOM($element->ownerDocument));
     }
     if ($this->_title != null) {
         $element->appendChild($this->_title->getDOM($element->ownerDocument));
     }
     if ($this->_updated != null) {
         $element->appendChild($this->_updated->getDOM($element->ownerDocument));
     }
     return $element;
 }
예제 #2
0
파일: Error.php 프로젝트: hackingman/TubeX
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_errorCode !== null) {
         $element->setAttribute('errorCode', $this->_errorCode);
     }
     if ($this->_reason !== null) {
         $element->setAttribute('reason', $this->_reason);
     }
     if ($this->_invalidInput !== null) {
         $element->setAttribute('invalidInput', $this->_invalidInput);
     }
     return $element;
 }