1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-01 18:02:45 +02:00

added parameters to cache method

This commit is contained in:
Oliver Vogel
2013-03-09 10:54:42 +01:00
parent 699c366bfe
commit 8536198892

View File

@@ -156,7 +156,7 @@ class Image
* @param Closure $callback
* @return Image
*/
public static function cache(Closure $callback = null)
public static function cache(Closure $callback = null, $lifetime = null, $returnObj = false)
{
if ( ! class_exists('\Intervention\Image\ImageCache')) {
throw new Exception('Please install package intervention/imagecache before running this function.');
@@ -166,7 +166,7 @@ class Image
$image = new \Intervention\Image\ImageCache;
$image = is_callable($callback) ? $callback($image) : $image;
return $image->get();
return $image->get($lifetime, $returnObj);
}
/**