web/lib/Zend/Gdata/YouTube.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_Gdata
    17  * @package    Zend_Gdata
    18  * @subpackage YouTube
    18  * @subpackage YouTube
    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: YouTube.php 24796 2012-05-12 03:34:26Z adamlundrigan $
    21  * @version    $Id$
    22  */
    22  */
    23 
    23 
    24 /**
    24 /**
    25  * @see Zend_Gdata_Media
    25  * @see Zend_Gdata_Media
    26  */
    26  */
    69 /**
    69 /**
    70  * @see Zend_Gdata_YouTube_InboxFeed
    70  * @see Zend_Gdata_YouTube_InboxFeed
    71  */
    71  */
    72 require_once 'Zend/Gdata/YouTube/InboxFeed.php';
    72 require_once 'Zend/Gdata/YouTube/InboxFeed.php';
    73 
    73 
       
    74 /** @see Zend_Xml_Security */
       
    75 require_once 'Zend/Xml/Security.php';
    74 
    76 
    75 /**
    77 /**
    76  * Service class for interacting with the YouTube Data API.
    78  * Service class for interacting with the YouTube Data API.
    77  * @link http://code.google.com/apis/youtube/
    79  * @link http://code.google.com/apis/youtube/
    78  *
    80  *
    79  * @category   Zend
    81  * @category   Zend
    80  * @package    Zend_Gdata
    82  * @package    Zend_Gdata
    81  * @subpackage YouTube
    83  * @subpackage YouTube
    82  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    84  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    83  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    85  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    84  */
    86  */
    85 class Zend_Gdata_YouTube extends Zend_Gdata_Media
    87 class Zend_Gdata_YouTube extends Zend_Gdata_Media
    86 {
    88 {
    87 
    89 
   650     public static function parseFormUploadTokenResponse($response)
   652     public static function parseFormUploadTokenResponse($response)
   651     {
   653     {
   652         // Load the feed as an XML DOMDocument object
   654         // Load the feed as an XML DOMDocument object
   653         @ini_set('track_errors', 1);
   655         @ini_set('track_errors', 1);
   654         $doc = new DOMDocument();
   656         $doc = new DOMDocument();
   655         $success = @$doc->loadXML($response);
   657         $doc = @Zend_Xml_Security::scan($response, $doc);
   656         @ini_restore('track_errors');
   658         @ini_restore('track_errors');
   657 
   659 
   658         if (!$success) {
   660         if (!$doc) {
   659             require_once 'Zend/Gdata/App/Exception.php';
   661             require_once 'Zend/Gdata/App/Exception.php';
   660             throw new Zend_Gdata_App_Exception(
   662             throw new Zend_Gdata_App_Exception(
   661                 "Zend_Gdata_YouTube::parseFormUploadTokenResponse - " .
   663                 "Zend_Gdata_YouTube::parseFormUploadTokenResponse - " .
   662                 "DOMDocument cannot parse XML: $php_errormsg");
   664                 "DOMDocument cannot parse XML: $php_errormsg");
   663         }
   665         }