src/Image/ImageManager.php
public function cache(Closure $callback, $lifetime = null, $returnObj = false)
    {
        if ($this->imageCache === null) {
            // create imagecache
            $this->imageCache = new ImageCache($this);
        }

        // run callback
        if (\is_callable($callback)) {
            $callback($this->imageCache);
        }

        return $this->imageCache->get($lifetime, $returnObj);
    }
public function cache(Closure $callback, $lifetime = null, $returnObj = false)
    {
        if ($this->imageCache === null) {
            // create imagecache
            $this->imageCache = new ImageCache($this);
        }

        // run callback
        if (\is_callable($callback)) {
            $callback($this->imageCache);
        }

        return $this->imageCache->get($lifetime, $returnObj);
    }
public function cache ( Closure $ callback , $ lifetime = null , $ returnObj = false ) { if ( $ this -> imageCache === null ) { // create imagecache $ this -> imageCache = new ImageCache ( $ this ) ; } // run callback if ( \ is_callable ( $ callback ) ) { $ callback ( $ this -> imageCache ) ; } return $ this -> imageCache -> get ( $ lifetime , $ returnObj ) ; }
Create new cached image and run callback

@param Closure $callback
@param int $lifetime
@param boolean $returnObj

@return Image
@throws MissingDependencyException
Create new cached image and run callback