|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Service |
|
17 * @subpackage Ebay |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: Keywords.php 22824 2010-08-09 18:59:54Z renanbr $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * @see Zend_Service_Ebay_Finding_Response_Abstract |
|
25 */ |
|
26 require_once 'Zend/Service/Ebay/Finding/Response/Abstract.php'; |
|
27 |
|
28 /** |
|
29 * @see Zend_Service_Ebay_Finding |
|
30 */ |
|
31 require_once 'Zend/Service/Ebay/Finding.php'; |
|
32 |
|
33 /** |
|
34 * @category Zend |
|
35 * @package Zend_Service |
|
36 * @subpackage Ebay |
|
37 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
39 * @uses Zend_Service_Ebay_Finding_Response_Abstract |
|
40 */ |
|
41 class Zend_Service_Ebay_Finding_Response_Keywords extends Zend_Service_Ebay_Finding_Response_Abstract |
|
42 { |
|
43 /** |
|
44 * Contains a spell-checked version of the submitted keywords. If no |
|
45 * recommended spelling can be identified for the submitted keywords, the |
|
46 * response contains a warning to that effect and an empty keywords field |
|
47 * is returned. |
|
48 * |
|
49 * @var string |
|
50 */ |
|
51 public $keywords; |
|
52 |
|
53 /** |
|
54 * @return void |
|
55 */ |
|
56 protected function _init() |
|
57 { |
|
58 parent::_init(); |
|
59 $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING; |
|
60 |
|
61 $this->keywords = $this->_query(".//$ns:keywords[1]", 'string'); |
|
62 } |
|
63 |
|
64 /** |
|
65 * @param Zend_Service_Ebay_Finding $proxy |
|
66 * @param Zend_Config|array $options |
|
67 * @return Zend_Service_Ebay_Finding_Response_Items |
|
68 */ |
|
69 public function findItems(Zend_Service_Ebay_Finding $proxy, $options = null) |
|
70 { |
|
71 // prepare options |
|
72 $options = Zend_Service_Ebay_Abstract::optionsToArray($options); |
|
73 $options = $options + $this->_options; |
|
74 |
|
75 // find items |
|
76 return $proxy->findItemsByKeywords($this->keywords, $options); |
|
77 } |
|
78 } |