/** * * @param DOMElement $element * @param Centurion_Service_Flickr $flickr * @return void */ public function __construct(DOMElement $element, Centurion_Service_Flickr $flickr) { parent::__construct($element, $flickr); //Depending form witch api key this class has been construct, thumbs urls can be found in the DOMElement (save one call) $rewriteParam = array('url_sq' => 'thumbSquare', 'url_t' => 'thumbThumbnail', 'url_s' => 'thumbSmall', 'url_m' => 'thumbSmall', 'url_o' => 'thumbOriginal'); foreach ($rewriteParam as $param => $realParam) { if (isset($this->{$param}) && !isset($this->{$realParam})) { $this->{$realParam} = $this->{$param}; } } }
/** * * @param DOMElement $element * @param Centurion_Service_Flickr $flickr */ public function __construct(DOMElement $element, Centurion_Service_Flickr $flickr) { parent::__construct($element, $flickr); $xpath = new DOMXPath($element->ownerDocument); $this->_sets = new Centurion_Service_Flickr_ResultSet($xpath->query('set', $element), $this->_flickr, 'set'); }