web/lib/Zend/Service/Delicious.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    14  * to license@zend.com so we can send you a copy immediately.
    14  * to license@zend.com so we can send you a copy immediately.
    15  *
    15  *
    16  * @category   Zend
    16  * @category   Zend
    17  * @package    Zend_Service
    17  * @package    Zend_Service
    18  * @subpackage Delicious
    18  * @subpackage Delicious
    19  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    21  * @version    $Id: Delicious.php 24593 2012-01-05 20:35:02Z matthew $
    21  * @version    $Id$
    22  */
    22  */
    23 
    23 
    24 
    24 
    25 /**
    25 /**
    26  * @see Zend_Rest_Client
    26  * @see Zend_Rest_Client
    45 /**
    45 /**
    46  * @see Zend_Service_Delicious_PostList
    46  * @see Zend_Service_Delicious_PostList
    47  */
    47  */
    48 require_once 'Zend/Service/Delicious/PostList.php';
    48 require_once 'Zend/Service/Delicious/PostList.php';
    49 
    49 
       
    50 /** @see Zend_Xml_Security */
       
    51 require_once 'Zend/Xml/Security.php';
    50 
    52 
    51 /**
    53 /**
    52  * Zend_Service_Delicious is a concrete implementation of the del.icio.us web service
    54  * Zend_Service_Delicious is a concrete implementation of the del.icio.us web service
    53  *
    55  *
    54  * @category   Zend
    56  * @category   Zend
    55  * @package    Zend_Service
    57  * @package    Zend_Service
    56  * @subpackage Delicious
    58  * @subpackage Delicious
    57  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    59  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    58  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    60  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    59  */
    61  */
    60 class Zend_Service_Delicious
    62 class Zend_Service_Delicious
    61 {
    63 {
    62     const API_URI = 'https://api.del.icio.us';
    64     const API_URI = 'https://api.del.icio.us';
   504         $responseBody = $response->getBody();
   506         $responseBody = $response->getBody();
   505 
   507 
   506         switch ($type) {
   508         switch ($type) {
   507             case 'xml':
   509             case 'xml':
   508                 $dom = new DOMDocument() ;
   510                 $dom = new DOMDocument() ;
   509 
   511     
   510                 if (!@$dom->loadXML($responseBody)) {
   512                 if (!$dom = @Zend_Xml_Security::scan($responseBody, $dom)) {
   511                     /**
   513                     /**
   512                      * @see Zend_Service_Delicious_Exception
   514                      * @see Zend_Service_Delicious_Exception
   513                      */
   515                      */
   514                     require_once 'Zend/Service/Delicious/Exception.php';
   516                     require_once 'Zend/Service/Delicious/Exception.php';
   515                     throw new Zend_Service_Delicious_Exception('XML Error');
   517                     throw new Zend_Service_Delicious_Exception('XML Error');