web/lib/Zend/Service/Amazon/SimpleDb/Response.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Service_Amazon
    16  * @package    Zend_Service_Amazon
    17  * @subpackage SimpleDb
    17  * @subpackage SimpleDb
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Http_Response
    23  * @see Zend_Http_Response
    26 
    26 
    27 /**
    27 /**
    28  * @category   Zend
    28  * @category   Zend
    29  * @package    Zend_Service_Amazon
    29  * @package    Zend_Service_Amazon
    30  * @subpackage SimpleDb
    30  * @subpackage SimpleDb
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    31  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    33  */
    33  */
    34 class Zend_Service_Amazon_SimpleDb_Response 
    34 class Zend_Service_Amazon_SimpleDb_Response
    35 {
    35 {
    36     /**
    36     /**
    37      * XML namespace used for SimpleDB responses.
    37      * XML namespace used for SimpleDB responses.
    38      */
    38      */
    39     protected $_xmlNamespace = 'http://sdb.amazonaws.com/doc/2009-04-15/';
    39     protected $_xmlNamespace = 'http://sdb.amazonaws.com/doc/2009-04-15/';
   118             $body = $this->_httpResponse->getBody();
   118             $body = $this->_httpResponse->getBody();
   119         } catch (Zend_Http_Exception $e) {
   119         } catch (Zend_Http_Exception $e) {
   120             $body = false;
   120             $body = false;
   121         }
   121         }
   122 
   122 
   123        
   123 
   124         return simplexml_load_string($body);
   124         return simplexml_load_string($body);
   125     }
   125     }
   126     
   126 
   127     /**
   127     /**
   128      * Get HTTP response object
   128      * Get HTTP response object
   129      * 
   129      *
   130      * @return Zend_Http_Response
   130      * @return Zend_Http_Response
   131      */
   131      */
   132     public function getHttpResponse() 
   132     public function getHttpResponse()
   133     {
   133     {
   134         return $this->_httpResponse;
   134         return $this->_httpResponse;
   135     }
   135     }
   136     
   136 
   137     /**
   137     /**
   138      * Gets the document object for this response
   138      * Gets the document object for this response
   139      *
   139      *
   140      * @return DOMDocument the DOM Document for this response.
   140      * @return DOMDocument the DOM Document for this response.
   141      */
   141      */
   154 
   154 
   155                 $this->_document = new DOMDocument();
   155                 $this->_document = new DOMDocument();
   156                 if (!$this->_document->loadXML($body)) {
   156                 if (!$this->_document->loadXML($body)) {
   157                     $this->_document = false;
   157                     $this->_document = false;
   158                 }
   158                 }
   159                 
   159 
   160                 // reset libxml error handling
   160                 // reset libxml error handling
   161                 libxml_clear_errors();
   161                 libxml_clear_errors();
   162                 libxml_use_internal_errors($errors);
   162                 libxml_use_internal_errors($errors);
   163             } else {
   163             } else {
   164                 $this->_document = false;
   164                 $this->_document = false;