Histograms.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: Histograms.php 22804 2010-08-08 05:08:05Z renanbr $
  21. */
  22. /**
  23. * @see Zend_Service_Ebay_Finding_Response_Abstract
  24. */
  25. require_once 'Zend/Service/Ebay/Finding/Response/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_Response_Abstract
  33. */
  34. class Zend_Service_Ebay_Finding_Response_Histograms extends Zend_Service_Ebay_Finding_Response_Abstract
  35. {
  36. /**
  37. * Response container for aspect histograms.
  38. *
  39. * Aspect histograms are returned for categories that have been mapped to
  40. * domains only. In most cases, just leaf categories are mapped to domains,
  41. * but there are exceptions.
  42. *
  43. * @var Zend_Service_Ebay_Finding_Aspect_Histogram_Container
  44. */
  45. public $aspectHistogramContainer;
  46. /**
  47. * Response container for category histograms.
  48. *
  49. * This container is returned only when the specified category has children
  50. * categories.
  51. *
  52. * @var Zend_Service_Ebay_Finding_Category_Histogram_Container
  53. */
  54. public $categoryHistogramContainer;
  55. /**
  56. * @return void
  57. */
  58. protected function _init()
  59. {
  60. parent::_init();
  61. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  62. $node = $this->_xPath->query(".//$ns:aspectHistogramContainer[1]", $this->_dom)->item(0);
  63. if ($node) {
  64. /**
  65. * @see Zend_Service_Ebay_Finding_Aspect_Histogram_Container
  66. */
  67. require_once 'Zend/Service/Ebay/Finding/Aspect/Histogram/Container.php';
  68. $this->aspectHistogramContainer = new Zend_Service_Ebay_Finding_Aspect_Histogram_Container($node);
  69. }
  70. $node = $this->_xPath->query(".//$ns:categoryHistogramContainer[1]", $this->_dom)->item(0);
  71. if ($node) {
  72. /**
  73. * @see Zend_Service_Ebay_Finding_Category_Histogram_Container
  74. */
  75. require_once 'Zend/Service/Ebay/Finding/Category/Histogram/Container.php';
  76. $this->categoryHistogramContainer = new Zend_Service_Ebay_Finding_Category_Histogram_Container($node);
  77. }
  78. }
  79. }