File indexing completed on 2025-01-26 05:25:27
0001 <?php 0002 0003 /** 0004 * Zend Framework 0005 * 0006 * LICENSE 0007 * 0008 * This source file is subject to the new BSD license that is bundled 0009 * with this package in the file LICENSE.txt. 0010 * It is also available through the world-wide-web at this URL: 0011 * http://framework.zend.com/license/new-bsd 0012 * If you did not receive a copy of the license and are unable to 0013 * obtain it through the world-wide-web, please send an email 0014 * to license@zend.com so we can send you a copy immediately. 0015 * 0016 * @category Zend 0017 * @package Zend_Service 0018 * @subpackage Flickr 0019 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0020 * @license http://framework.zend.com/license/new-bsd New BSD License 0021 * @version $Id$ 0022 */ 0023 0024 0025 /** 0026 * @category Zend 0027 * @package Zend_Service 0028 * @subpackage Flickr 0029 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0030 * @license http://framework.zend.com/license/new-bsd New BSD License 0031 */ 0032 class Zend_Service_Flickr_Result 0033 { 0034 /** 0035 * The photo's Flickr ID. 0036 * 0037 * @var string 0038 */ 0039 public $id; 0040 0041 /** 0042 * The photo owner's NSID. 0043 * 0044 * @var string 0045 */ 0046 public $owner; 0047 0048 /** 0049 * A key used in URI construction. 0050 * 0051 * @var string 0052 */ 0053 public $secret; 0054 0055 /** 0056 * The servername to use for URI construction. 0057 * 0058 * @var string 0059 */ 0060 public $server; 0061 0062 /** 0063 * The photo's title. 0064 * 0065 * @var string 0066 */ 0067 public $title; 0068 0069 /** 0070 * Whether the photo is public. 0071 * 0072 * @var string 0073 */ 0074 public $ispublic; 0075 0076 /** 0077 * Whether the photo is visible to you because you are a friend of the owner. 0078 * 0079 * @var string 0080 */ 0081 public $isfriend; 0082 0083 /** 0084 * Whether the photo is visible to you because you are family of the owner. 0085 * 0086 * @var string 0087 */ 0088 public $isfamily; 0089 0090 /** 0091 * The license the photo is available under. 0092 * 0093 * @var string 0094 */ 0095 public $license; 0096 0097 /** 0098 * The date the photo was uploaded. 0099 * 0100 * @var string 0101 */ 0102 public $dateupload; 0103 0104 /** 0105 * The date the photo was taken. 0106 * 0107 * @var string 0108 */ 0109 public $datetaken; 0110 0111 /** 0112 * The screenname of the owner. 0113 * 0114 * @var string 0115 */ 0116 public $ownername; 0117 0118 /** 0119 * The server used in assembling icon URLs. 0120 * 0121 * @var string 0122 */ 0123 public $iconserver; 0124 0125 /** 0126 * A 75x75 pixel square thumbnail of the image. 0127 * 0128 * @var Zend_Service_Flickr_Image 0129 */ 0130 public $Square; 0131 0132 /** 0133 * A 100 pixel thumbnail of the image. 0134 * 0135 * @var Zend_Service_Flickr_Image 0136 */ 0137 public $Thumbnail; 0138 0139 /** 0140 * A 240 pixel version of the image. 0141 * 0142 * @var Zend_Service_Flickr_Image 0143 */ 0144 public $Small; 0145 0146 /** 0147 * A 500 pixel version of the image. 0148 * 0149 * @var Zend_Service_Flickr_Image 0150 */ 0151 public $Medium; 0152 0153 /** 0154 * A 640 pixel version of the image. 0155 * 0156 * @var Zend_Service_Flickr_Image 0157 */ 0158 public $Large; 0159 0160 /** 0161 * The original image. 0162 * 0163 * @var Zend_Service_Flickr_Image 0164 */ 0165 public $Original; 0166 0167 /** 0168 * Original Zend_Service_Flickr object. 0169 * 0170 * @var Zend_Service_Flickr 0171 */ 0172 protected $_flickr; 0173 0174 /** 0175 * Parse the Flickr Result 0176 * 0177 * @param DOMElement $image 0178 * @param Zend_Service_Flickr $flickr Original Zend_Service_Flickr object with which the request was made 0179 * @return void 0180 */ 0181 public function __construct(DOMElement $image, Zend_Service_Flickr $flickr) 0182 { 0183 $xpath = new DOMXPath($image->ownerDocument); 0184 0185 foreach ($xpath->query('./@*', $image) as $property) { 0186 $this->{$property->name} = (string) $property->value; 0187 } 0188 0189 $this->_flickr = $flickr; 0190 0191 foreach ($this->_flickr->getImageDetails($this->id) as $k => $v) { 0192 $this->$k = $v; 0193 } 0194 } 0195 }