コード例 #1
0
 /**
  * Instantiate an Image from an image table id
  * @param int $imageId  id of image to create an Image instance from  
  * @return \Image
  */
 public static function constructById($imageId)
 {
     $row = Model\Image::getImageById($imageId);
     if (isset($row['id'])) {
         $image = self::constructByRow($row);
         $image->setId($row['id']);
         return $image;
     }
     return null;
 }