|
1 <?php |
|
2 |
|
3 /** |
|
4 * Zend Framework |
|
5 * |
|
6 * LICENSE |
|
7 * |
|
8 * This source file is subject to the new BSD license that is bundled |
|
9 * with this package in the file LICENSE.txt. |
|
10 * It is also available through the world-wide-web at this URL: |
|
11 * http://framework.zend.com/license/new-bsd |
|
12 * If you did not receive a copy of the license and are unable to |
|
13 * obtain it through the world-wide-web, please send an email |
|
14 * to license@zend.com so we can send you a copy immediately. |
|
15 * |
|
16 * @category Zend |
|
17 * @package Zend_Service |
|
18 * @subpackage Yahoo |
|
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
20 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
21 * @version $Id: ImageResult.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
22 */ |
|
23 |
|
24 |
|
25 /** |
|
26 * @see Zend_Service_Yahoo_Result |
|
27 */ |
|
28 require_once 'Zend/Service/Yahoo/Result.php'; |
|
29 |
|
30 |
|
31 /** |
|
32 * @category Zend |
|
33 * @package Zend_Service |
|
34 * @subpackage Yahoo |
|
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
37 */ |
|
38 class Zend_Service_Yahoo_ImageResult extends Zend_Service_Yahoo_Result |
|
39 { |
|
40 /** |
|
41 * Summary info for the image |
|
42 * |
|
43 * @var string |
|
44 */ |
|
45 public $Summary; |
|
46 |
|
47 /** |
|
48 * The URL of the webpage hosting the image |
|
49 * |
|
50 * @var string |
|
51 */ |
|
52 public $RefererUrl; |
|
53 |
|
54 /** |
|
55 * The size of the files in bytes |
|
56 * |
|
57 * @var string |
|
58 */ |
|
59 public $FileSize; |
|
60 |
|
61 /** |
|
62 * The type of file (bmp, gif, jpeg, etc.) |
|
63 * |
|
64 * @var string |
|
65 */ |
|
66 public $FileFormat; |
|
67 |
|
68 /** |
|
69 * The height of the image in pixels |
|
70 * |
|
71 * @var string |
|
72 */ |
|
73 public $Height; |
|
74 |
|
75 /** |
|
76 * The width of the image in pixels |
|
77 * |
|
78 * @var string |
|
79 */ |
|
80 public $Width; |
|
81 |
|
82 /** |
|
83 * The thubmnail image for the article, if it exists |
|
84 * |
|
85 * @var Zend_Service_Yahoo_Image |
|
86 */ |
|
87 public $Thumbnail; |
|
88 |
|
89 /** |
|
90 * Image result namespace |
|
91 * |
|
92 * @var string |
|
93 */ |
|
94 protected $_namespace = 'urn:yahoo:srchmi'; |
|
95 |
|
96 |
|
97 /** |
|
98 * Initializes the image result |
|
99 * |
|
100 * @param DOMElement $result |
|
101 * @return void |
|
102 */ |
|
103 public function __construct(DOMElement $result) |
|
104 { |
|
105 $this->_fields = array('Summary', 'RefererUrl', 'FileSize', 'FileFormat', 'Height', 'Width', 'Thumbnail'); |
|
106 |
|
107 parent::__construct($result); |
|
108 |
|
109 $this->_setThumbnail(); |
|
110 } |
|
111 } |