VideoResult.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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_VideoResult extends Zend_Service_Yahoo_Result
  34. {
  35. /**
  36. * Summary info for the video
  37. *
  38. * @var string
  39. */
  40. public $Summary;
  41. /**
  42. * The URL of the webpage hosting the video
  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 video in pixels
  61. *
  62. * @var string
  63. */
  64. public $Height;
  65. /**
  66. * The width of the video in pixels
  67. *
  68. * @var string
  69. */
  70. public $Width;
  71. /**
  72. * The duration of the video in seconds
  73. *
  74. * @var string
  75. */
  76. public $Duration;
  77. /**
  78. * The number of audio channels in the video
  79. *
  80. * @var string
  81. */
  82. public $Channels;
  83. /**
  84. * Whether the video is streamed or not
  85. *
  86. * @var boolean
  87. */
  88. public $Streaming;
  89. /**
  90. * The thubmnail video for the article, if it exists
  91. *
  92. * @var Zend_Service_Yahoo_Video
  93. */
  94. public $Thumbnail;
  95. /**
  96. * Video result namespace
  97. *
  98. * @var string
  99. */
  100. protected $_namespace = 'urn:yahoo:srchmv';
  101. /**
  102. * Initializes the video result
  103. *
  104. * @param DOMElement $result
  105. * @return void
  106. */
  107. public function __construct(DOMElement $result)
  108. {
  109. $this->_fields = array('Summary', 'RefererUrl', 'FileSize', 'FileFormat', 'Height', 'Width', 'Duration', 'Channels', 'Streaming', 'Thumbnail');
  110. parent::__construct($result);
  111. $this->_setThumbnail();
  112. }
  113. }