Added getOriginalFiles() to Image

This commit is contained in:
Isaac 2017-11-24 20:13:45 -08:00
parent 7ae95fa46f
commit 249b98311e

View file

@ -154,6 +154,21 @@ class Image extends Model
}
}
/**
* Finds the names of all the original-sized images uploaded to the server
* @return string[]
*/
public static function getOriginalFiles() {
$rv = array();
//We use a cursor to cut down on memory
foreach (Image::cursor() as $image) {
$rv[] = $image->getFile(Image::ORIGINAL);
}
return $rv;
}
protected $table = 'images';
public function getUrl($type = self::NORMAL)