File indexing completed on 2024-12-22 05:37:06
0001 <?php 0002 0003 /** 0004 * Zend Framework 0005 * 0006 * LICENSE 0007 * 0008 * This source file is subject to the new BSD license that is bundled 0009 * with this package in the file LICENSE.txt. 0010 * It is also available through the world-wide-web at this URL: 0011 * http://framework.zend.com/license/new-bsd 0012 * If you did not receive a copy of the license and are unable to 0013 * obtain it through the world-wide-web, please send an email 0014 * to license@zend.com so we can send you a copy immediately. 0015 * 0016 * @category Zend 0017 * @package Zend_Service 0018 * @subpackage Yahoo 0019 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0020 * @license http://framework.zend.com/license/new-bsd New BSD License 0021 * @version $Id$ 0022 */ 0023 0024 0025 /** 0026 * @see Zend_Service_Yahoo_ResultSet 0027 */ 0028 // require_once 'Zend/Service/Yahoo/ResultSet.php'; 0029 0030 0031 /** 0032 * @see Zend_Service_Yahoo_LocalResult 0033 */ 0034 // require_once 'Zend/Service/Yahoo/LocalResult.php'; 0035 0036 0037 /** 0038 * @category Zend 0039 * @package Zend_Service 0040 * @subpackage Yahoo 0041 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0042 * @license http://framework.zend.com/license/new-bsd New BSD License 0043 */ 0044 class Zend_Service_Yahoo_LocalResultSet extends Zend_Service_Yahoo_ResultSet 0045 { 0046 /** 0047 * The URL of a webpage containing a map graphic with all returned results plotted on it. 0048 * 0049 * @var string 0050 */ 0051 public $resultSetMapURL; 0052 0053 /** 0054 * Local result set namespace 0055 * 0056 * @var string 0057 */ 0058 protected $_namespace = 'urn:yahoo:lcl'; 0059 0060 0061 /** 0062 * Initializes the local result set 0063 * 0064 * @param DOMDocument $dom 0065 * @return void 0066 */ 0067 public function __construct(DOMDocument $dom) 0068 { 0069 parent::__construct($dom); 0070 0071 $this->resultSetMapURL = $this->_xpath->query('//yh:ResultSetMapUrl/text()')->item(0)->data; 0072 } 0073 0074 0075 /** 0076 * Overrides Zend_Service_Yahoo_ResultSet::current() 0077 * 0078 * @return Zend_Service_Yahoo_LocalResult 0079 */ 0080 public function current() 0081 { 0082 return new Zend_Service_Yahoo_LocalResult($this->_results->item($this->_currentIndex)); 0083 } 0084 }