diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/Ebay/Finding/Response/Abstract.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/Ebay/Finding/Response/Abstract.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,185 @@ +ack = $this->_query(".//$ns:ack[1]", 'string'); + $this->timestamp = $this->_query(".//$ns:timestamp[1]", 'string'); + $this->version = $this->_query(".//$ns:version[1]", 'string'); + + $node = $this->_xPath->query(".//$ns:errorMessage[1]", $this->_dom)->item(0); + if ($node) { + /** + * @see Zend_Service_Ebay_Finding_Error_Message + */ + require_once 'Zend/Service/Ebay/Finding/Error/Message.php'; + $this->errorMessage = new Zend_Service_Ebay_Finding_Error_Message($node); + } + } + + /** + * @param string $operation + * @return Zend_Service_Ebay_Finding_Response_Abstract Provides a fluent interface + */ + public function setOperation($operation) + { + $this->_operation = (string) $operation; + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->_operation; + } + + /** + * @param string|Zend_Config|array $name + * @param mixed $value + * @return Zend_Service_Ebay_Finding_Response_Abstract Provides a fluent interface + */ + public function setOption($name, $value = null) + { + if ($name instanceof Zend_Config) { + $name = $name->toArray(); + } + if (is_array($name)) { + $this->_options = $name; + } else { + $this->_options[$name] = $value; + } + return $this; + } + + /** + * @param string $name + * @return mixed + */ + public function getOption($name = null) + { + if (null === $name) { + return $this->_options; + } + if (array_key_exists($name, $this->_options)) { + return $this->_options[$name]; + } + return null; + } +}