Category.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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: Category.php 22824 2010-08-09 18:59:54Z 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_Category extends Zend_Service_Ebay_Finding_Abstract
  35. {
  36. /**
  37. * The unique ID of a category on the specified eBay site.
  38. *
  39. * @var string
  40. */
  41. public $categoryId;
  42. /**
  43. * Display name of a category as it appears on the eBay Web site.
  44. *
  45. * @var string
  46. */
  47. public $categoryName;
  48. /**
  49. * @return void
  50. */
  51. protected function _init()
  52. {
  53. parent::_init();
  54. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  55. $this->categoryId = $this->_query(".//$ns:categoryId[1]", 'string');
  56. $this->categoryName = $this->_query(".//$ns:categoryName[1]", 'string');
  57. }
  58. /**
  59. * @param Zend_Service_Ebay_Finding $proxy
  60. * @param Zend_Config|array $options
  61. * @return Zend_Service_Ebay_Finding_Response_Items
  62. */
  63. public function findItems(Zend_Service_Ebay_Finding $proxy, $options = null)
  64. {
  65. return $proxy->findItemsByCategory($this->categoryId, $options);
  66. }
  67. }