ImageResult.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 Yahoo
  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$
  21. */
  22. /**
  23. * @see Zend_Service_Yahoo_Result
  24. */
  25. require_once 'Zend/Service/Yahoo/Result.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service
  29. * @subpackage Yahoo
  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. */
  33. class Zend_Service_Yahoo_ImageResult extends Zend_Service_Yahoo_Result
  34. {
  35. /**
  36. * Summary info for the image
  37. *
  38. * @var string
  39. */
  40. public $Summary;
  41. /**
  42. * The URL of the webpage hosting the image
  43. *
  44. * @var string
  45. */
  46. public $RefererUrl;
  47. /**
  48. * The size of the files in bytes
  49. *
  50. * @var string
  51. */
  52. public $FileSize;
  53. /**
  54. * The type of file (bmp, gif, jpeg, etc.)
  55. *
  56. * @var string
  57. */
  58. public $FileFormat;
  59. /**
  60. * The height of the image in pixels
  61. *
  62. * @var string
  63. */
  64. public $Height;
  65. /**
  66. * The width of the image in pixels
  67. *
  68. * @var string
  69. */
  70. public $Width;
  71. /**
  72. * The thubmnail image for the article, if it exists
  73. *
  74. * @var Zend_Service_Yahoo_Image
  75. */
  76. public $Thumbnail;
  77. /**
  78. * Image result namespace
  79. *
  80. * @var string
  81. */
  82. protected $_namespace = 'urn:yahoo:srchmi';
  83. /**
  84. * Initializes the image result
  85. *
  86. * @param DOMElement $result
  87. * @return void
  88. */
  89. public function __construct(DOMElement $result)
  90. {
  91. $this->_fields = array('Summary', 'RefererUrl', 'FileSize', 'FileFormat', 'Height', 'Width', 'Thumbnail');
  92. parent::__construct($result);
  93. $this->_setThumbnail();
  94. }
  95. }