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_Service |
17 * @package Zend_Service |
18 * @subpackage Yahoo |
18 * @subpackage Yahoo |
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: Yahoo.php 24593 2012-01-05 20:35:02Z matthew $ |
21 * @version $Id$ |
22 */ |
22 */ |
23 |
23 |
|
24 /** @see Zend_Xml_Security */ |
|
25 require_once 'Zend/Xml/Security.php'; |
24 |
26 |
25 /** |
27 /** |
26 * @category Zend |
28 * @category Zend |
27 * @package Zend_Service |
29 * @package Zend_Service |
28 * @subpackage Yahoo |
30 * @subpackage Yahoo |
29 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
30 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
31 */ |
33 */ |
32 class Zend_Service_Yahoo |
34 class Zend_Service_Yahoo |
33 { |
35 { |
34 /** |
36 /** |
97 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
99 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
98 $response->getStatus()); |
100 $response->getStatus()); |
99 } |
101 } |
100 |
102 |
101 $dom = new DOMDocument(); |
103 $dom = new DOMDocument(); |
102 $dom->loadXML($response->getBody()); |
104 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
103 |
|
104 self::_checkErrors($dom); |
105 self::_checkErrors($dom); |
105 |
106 |
106 /** |
107 /** |
107 * @see Zend_Service_Yahoo_InlinkDataResultSet |
108 * @see Zend_Service_Yahoo_InlinkDataResultSet |
108 */ |
109 */ |
153 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
154 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
154 $response->getStatus()); |
155 $response->getStatus()); |
155 } |
156 } |
156 |
157 |
157 $dom = new DOMDocument(); |
158 $dom = new DOMDocument(); |
158 $dom->loadXML($response->getBody()); |
159 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
159 |
|
160 self::_checkErrors($dom); |
160 self::_checkErrors($dom); |
161 |
161 |
162 /** |
162 /** |
163 * @see Zend_Service_YahooImageResultSet |
163 * @see Zend_Service_YahooImageResultSet |
164 */ |
164 */ |
217 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
217 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
218 $response->getStatus()); |
218 $response->getStatus()); |
219 } |
219 } |
220 |
220 |
221 $dom = new DOMDocument(); |
221 $dom = new DOMDocument(); |
222 $dom->loadXML($response->getBody()); |
222 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
223 |
|
224 self::_checkErrors($dom); |
223 self::_checkErrors($dom); |
225 |
224 |
226 /** |
225 /** |
227 * @see Zend_Service_Yahoo_LocalResultSet |
226 * @see Zend_Service_Yahoo_LocalResultSet |
228 */ |
227 */ |
271 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
270 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
272 $response->getStatus()); |
271 $response->getStatus()); |
273 } |
272 } |
274 |
273 |
275 $dom = new DOMDocument(); |
274 $dom = new DOMDocument(); |
276 $dom->loadXML($response->getBody()); |
275 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
277 |
|
278 self::_checkErrors($dom); |
276 self::_checkErrors($dom); |
279 |
277 |
280 /** |
278 /** |
281 * @see Zend_Service_Yahoo_NewsResultSet |
279 * @see Zend_Service_Yahoo_NewsResultSet |
282 */ |
280 */ |
318 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
316 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
319 $response->getStatus()); |
317 $response->getStatus()); |
320 } |
318 } |
321 |
319 |
322 $dom = new DOMDocument(); |
320 $dom = new DOMDocument(); |
323 $dom->loadXML($response->getBody()); |
321 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
324 |
|
325 self::_checkErrors($dom); |
322 self::_checkErrors($dom); |
326 |
323 |
327 /** |
324 /** |
328 * @see Zend_Service_Yahoo_PageDataResultSet |
325 * @see Zend_Service_Yahoo_PageDataResultSet |
329 */ |
326 */ |
372 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
369 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
373 $response->getStatus()); |
370 $response->getStatus()); |
374 } |
371 } |
375 |
372 |
376 $dom = new DOMDocument(); |
373 $dom = new DOMDocument(); |
377 $dom->loadXML($response->getBody()); |
374 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
378 |
|
379 self::_checkErrors($dom); |
375 self::_checkErrors($dom); |
380 |
376 |
381 /** |
377 /** |
382 * @see Zend_Service_YahooVideoResultSet |
378 * @see Zend_Service_YahooVideoResultSet |
383 */ |
379 */ |
429 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
425 throw new Zend_Service_Exception('An error occurred sending request. Status code: ' . |
430 $response->getStatus()); |
426 $response->getStatus()); |
431 } |
427 } |
432 |
428 |
433 $dom = new DOMDocument(); |
429 $dom = new DOMDocument(); |
434 $dom->loadXML($response->getBody()); |
430 $dom = Zend_Xml_Security::scan($response->getBody(), $dom); |
435 |
|
436 self::_checkErrors($dom); |
431 self::_checkErrors($dom); |
437 |
432 |
438 /** |
433 /** |
439 * @see Zend_Service_Yahoo_WebResultSet |
434 * @see Zend_Service_Yahoo_WebResultSet |
440 */ |
435 */ |