|
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: Container.php 22791 2010-08-04 16:11:47Z renanbr $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * @see Zend_Service_Ebay_Finding_Abstract |
|
25 */ |
|
26 require_once 'Zend/Service/Ebay/Finding/Abstract.php'; |
|
27 |
|
28 /** |
|
29 * @category Zend |
|
30 * @package Zend_Service |
|
31 * @subpackage Ebay |
|
32 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
34 * @uses Zend_Service_Ebay_Finding_Abstract |
|
35 */ |
|
36 class Zend_Service_Ebay_Finding_Aspect_Histogram_Container extends Zend_Service_Ebay_Finding_Abstract |
|
37 { |
|
38 /** |
|
39 * A characteristic of an item in a domain. |
|
40 * |
|
41 * For example, "Optical Zoom", "Brand", and "Megapixels" could be aspects |
|
42 * of the Digital Cameras domain. Aspects are well-known, standardized |
|
43 * characteristics of a domain, and they vary from domain to domain (the |
|
44 * aspects of "Men's Shoes" are different from those of "Digital Cameras"). |
|
45 * A search request on the eBay site will often display aspects and their |
|
46 * respective aspect values on the left-had side of a query response. |
|
47 * |
|
48 * Aspects are extracted from item listing properties (such as item titles |
|
49 * and subtitles), and represent the characteristics of active items. Values |
|
50 * returned in the Aspect container can be used as inputs to the |
|
51 * aspectFilter fields in a query to distill the items returned by the |
|
52 * query. eBay generates aspects dynamically from the items currently |
|
53 * listed; aspects provide a view into what is currently available on eBay. |
|
54 * Because of this, aspect values returned one day cannot be guaranteed to |
|
55 * be valid the next day. |
|
56 * |
|
57 * @var Zend_Service_Ebay_Finding_Aspect_Set |
|
58 */ |
|
59 public $aspect; |
|
60 |
|
61 /** |
|
62 * A buy-side group of items, for example "Shoes.". |
|
63 * |
|
64 * Domains are extracted from item listing properties, such as the title, |
|
65 * descriptions, and so on. |
|
66 * |
|
67 * @var string |
|
68 */ |
|
69 public $domainDisplayName; |
|
70 |
|
71 /** |
|
72 * A buy-side group of items that share aspects, but not necessarily an eBay |
|
73 * category. |
|
74 * |
|
75 * For example "Women's Dresses" or "Digital Cameras" could be domains. You |
|
76 * can use a domainName to label a set of aspects that you display. |
|
77 * |
|
78 * @var string |
|
79 */ |
|
80 public $domainName; |
|
81 |
|
82 /** |
|
83 * @return void |
|
84 */ |
|
85 protected function _init() |
|
86 { |
|
87 parent::_init(); |
|
88 $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING; |
|
89 |
|
90 $this->domainDisplayName = $this->_query(".//$ns:domainDisplayName[1]", 'string'); |
|
91 $this->domainName = $this->_query(".//$ns:domainName[1]", 'string'); |
|
92 |
|
93 $this->_attributes['aspect'] = array( |
|
94 'name' => $this->_query(".//$ns:aspect/@name", 'string', true) |
|
95 ); |
|
96 |
|
97 $nodes = $this->_xPath->query(".//$ns:aspect", $this->_dom); |
|
98 if ($nodes->length > 0) { |
|
99 /** |
|
100 * @see Zend_Service_Ebay_Finding_Aspect_Set |
|
101 */ |
|
102 require_once 'Zend/Service/Ebay/Finding/Aspect/Set.php'; |
|
103 $this->aspect = new Zend_Service_Ebay_Finding_Aspect_Set($nodes); |
|
104 } |
|
105 } |
|
106 } |