Source of file FlickrData.php
Size: 0,938 Bytes - Last Modified: 2021-12-23T10:02:40+00:00
/var/www/docs.ssmods.com/process/src/code/model/FlickrData.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php /** * Class FlickrData * * Represents a single object retrieved from the Flickr API. This shouldn't be used directly (hence being abstract), but * is extended by other objects - e.g. {@link FlickrPhoto}, {@link FlickrPhotoset} */ abstract class FlickrData extends ViewableData { protected $data; private static $casting = array( 'ID' => 'Varchar' // ID values for Flickr data can either be varchars or integers ); public function __construct($set) { $this->data = $set; } public function getID() { return $this->data['id']; } public function __get($property) { if ($this->hasMethod($method = "get$property")) { return $this->$method(); } elseif (isset($this->data[strtolower($property)])) { return $this->data[strtolower($property)]; } else { return parent::__get($property); } } } |