示例#1
0
 /**
  * Find all images
  *
  * @return array All images
  */
 public function findAll()
 {
     $images = $this->dao->findAll();
     $result = array();
     foreach ($images as $image) {
         $result[] = array_merge($image, $this->flickr->getSizes($image['photo_id']));
     }
     return $result;
 }
 /**
  * Returns sizes array for photo identified by Flickr photo id
  *
  * @param  int   $photoId
  * @return array Array of photo size information
  */
 public function getSizes($photoId)
 {
     $sizes = $this->adapter->getItem($photoId);
     if (is_null($sizes)) {
         $sizes = $this->flickr->getSizes($photoId);
         $this->adapter->addItem($photoId, $sizes);
     }
     return $sizes;
 }