equal
deleted
inserted
replaced
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 App |
18 * @subpackage App |
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: Base.php 24593 2012-01-05 20:35:02Z matthew $ |
21 * @version $Id$ |
22 */ |
22 */ |
23 |
23 |
24 /** |
24 /** |
25 * @see Zend_Gdata_App_Util |
25 * @see Zend_Gdata_App_Util |
26 */ |
26 */ |
27 require_once 'Zend/Gdata/App/Util.php'; |
27 require_once 'Zend/Gdata/App/Util.php'; |
|
28 |
|
29 /** @see Zend_Xml_Security */ |
|
30 require_once 'Zend/Xml/Security.php'; |
28 |
31 |
29 /** |
32 /** |
30 * Abstract class for all XML elements |
33 * Abstract class for all XML elements |
31 * |
34 * |
32 * @category Zend |
35 * @category Zend |
33 * @package Zend_Gdata |
36 * @package Zend_Gdata |
34 * @subpackage App |
37 * @subpackage App |
35 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
38 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
39 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 */ |
40 */ |
38 abstract class Zend_Gdata_App_Base |
41 abstract class Zend_Gdata_App_Base |
39 { |
42 { |
40 |
43 |
299 { |
302 { |
300 if ($xml) { |
303 if ($xml) { |
301 // Load the feed as an XML DOMDocument object |
304 // Load the feed as an XML DOMDocument object |
302 @ini_set('track_errors', 1); |
305 @ini_set('track_errors', 1); |
303 $doc = new DOMDocument(); |
306 $doc = new DOMDocument(); |
304 $success = @$doc->loadXML($xml); |
307 $doc = @Zend_Xml_Security::scan($xml, $doc); |
305 @ini_restore('track_errors'); |
308 @ini_restore('track_errors'); |
306 if (!$success) { |
309 if (!$doc) { |
307 require_once 'Zend/Gdata/App/Exception.php'; |
310 require_once 'Zend/Gdata/App/Exception.php'; |
308 throw new Zend_Gdata_App_Exception("DOMDocument cannot parse XML: $php_errormsg"); |
311 throw new Zend_Gdata_App_Exception("DOMDocument cannot parse XML: $php_errormsg"); |
309 } |
312 } |
310 $element = $doc->getElementsByTagName($this->_rootElement)->item(0); |
313 $element = $doc->getElementsByTagName($this->_rootElement)->item(0); |
311 if (!$element) { |
314 if (!$element) { |