Aspect.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: Aspect.php 22791 2010-08-04 16:11:47Z renanbr $
  21. */
  22. /**
  23. * @see Zend_Service_Ebay_Finding_Abstract
  24. */
  25. require_once 'Zend/Service/Ebay/Finding/Abstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service
  29. * @subpackage Ebay
  30. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @license http://framework.zend.com/license/new-bsd New BSD License
  32. * @uses Zend_Service_Ebay_Finding_Abstract
  33. */
  34. class Zend_Service_Ebay_Finding_Aspect extends Zend_Service_Ebay_Finding_Abstract
  35. {
  36. /**
  37. * Container that returns the name of the respective aspect value and the
  38. * histogram (the number of available items) that share that item
  39. * characteristic.
  40. *
  41. * @var Zend_Service_Ebay_Finding_Aspect_Histogram_Value_Set
  42. */
  43. public $valueHistogram;
  44. /**
  45. * @return void
  46. */
  47. protected function _init()
  48. {
  49. parent::_init();
  50. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  51. $this->_attributes['valueHistogram'] = array(
  52. 'valueName' => $this->_query(".//$ns:valueHistogram/@valueName", 'string', true)
  53. );
  54. $nodes = $this->_xPath->query(".//$ns:valueHistogram", $this->_dom);
  55. if ($nodes->length > 0) {
  56. /**
  57. * @see Zend_Service_Ebay_Finding_Aspect_Histogram_Value_Set
  58. */
  59. require_once 'Zend/Service/Ebay/Finding/Aspect/Histogram/Value/Set.php';
  60. $this->valueHistogram = new Zend_Service_Ebay_Finding_Aspect_Histogram_Value_Set($nodes);
  61. }
  62. }
  63. }