Ejemplo n.º 1
0
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_totalResults != null) {
         $element->appendChild($this->_totalResults->getDOM($element->ownerDocument));
     }
     if ($this->_startIndex != null) {
         $element->appendChild($this->_startIndex->getDOM($element->ownerDocument));
     }
     if ($this->_itemsPerPage != null) {
         $element->appendChild($this->_itemsPerPage->getDOM($element->ownerDocument));
     }
     // ETags are special. We only support them in protocol >= 2.X.
     // This will be duplicated by the HTTP ETag header.
     if ($majorVersion >= 2) {
         if ($this->_etag != null) {
             $element->setAttributeNS($this->lookupNamespace('gd'), 'gd:etag', $this->_etag->getFieldValue());
         }
     }
     return $element;
 }