/** * Return the image from the image_id * @access public * @return Image */ public function read_image() { if (empty($this->_image)) { $this->_image = ImageBrowser::get($this->image_id); } return $this->_image; }
/** * ls the images folder (exclude bad extensions or non readable files) * @access public * @return array */ public static function all() { static $all = null; if (is_null($all)) { $folder_handle = opendir("pix/"); $all = array(); while (false !== ($filename = readdir($folder_handle))) { if (substr($filename, 0, 1) != '.' && ($image = ImageBrowser::get($filename))) { $all[] = $image; } } } return $all; }