$nsUri) { $this->registerNamespace($nsPrefix, $nsUri); } parent::__construct($element); } 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)); } return $element; } /** * Creates individual Entry objects of the appropriate type and * stores them in the $_entry array based upon DOM data. * * @param DOMNode $child The DOMNode to process */ protected function takeChildFromDOM($child) { $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; switch ($absoluteNodeName) { case $this->lookupNamespace('openSearch') . ':' . 'totalResults': $totalResults = new Zend_Gdata_Extension_OpenSearchTotalResults(); $totalResults->transferFromDOM($child); $this->_totalResults = $totalResults; break; case $this->lookupNamespace('openSearch') . ':' . 'startIndex': $startIndex = new Zend_Gdata_Extension_OpenSearchStartIndex(); $startIndex->transferFromDOM($child); $this->_startIndex = $startIndex; break; case $this->lookupNamespace('openSearch') . ':' . 'itemsPerPage': $itemsPerPage = new Zend_Gdata_Extension_OpenSearchItemsPerPage(); $itemsPerPage->transferFromDOM($child); $this->_itemsPerPage = $itemsPerPage; break; default: parent::takeChildFromDOM($child); break; } } function setTotalResults($value) { $this->_totalResults = $value; return $this; } function getTotalResults() { return $this->_totalResults; } function setStartIndex($value) { $this->_startIndex = $value; return $this; } function getStartIndex() { return $this->_startIndex; } function setItemsPerPage($value) { $this->_itemsPerPage = $value; return $this; } function getItemsPerPage() { return $this->_itemsPerPage; } }