Imagine/CachePathResolver.php
public function getBrowserPath($path, $filter, $absolute = false)
    {
        // identify if current path is not under specified source root and return
        // unmodified path in that case
        $realPath = realpath($this->sourceRoot.$path);

        if (!0 === strpos($realPath, $this->sourceRoot)) {
            return $path;
        }

        $path = str_replace(
            urlencode(ltrim($path, '/')),
            urldecode(ltrim($path, '/')),
            $this->router->generate('_imagine_'.$filter, array(
                'path' => ltrim($path, '/')
            ), $absolute)
        );
        
        $cached = realpath($this->webRoot.$path);

        if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached)) {
            unlink($cached);
        }

        return $path;
    }
public function getBrowserPath($path, $filter, $absolute = false)
    {
        // identify if current path is not under specified source root and return
        // unmodified path in that case
        $realPath = realpath($this->sourceRoot.$path);

        if (!0 === strpos($realPath, $this->sourceRoot)) {
            return $path;
        }

        $path = str_replace(
            urlencode(ltrim($path, '/')),
            urldecode(ltrim($path, '/')),
            $this->router->generate('_imagine_'.$filter, array(
                'path' => ltrim($path, '/')
            ), $absolute)
        );
        
        $cached = realpath($this->webRoot.$path);

        if (file_exists($cached) && !is_dir($cached) && filemtime($realPath) > filemtime($cached)) {
            unlink($cached);
        }

        return $path;
    }
public function getBrowserPath ( $ path , $ filter , $ absolute = false ) { // identify if current path is not under specified source root and return // unmodified path in that case $ realPath = realpath ( $ this -> sourceRoot . $ path ) ; if ( ! 0 === strpos ( $ realPath , $ this -> sourceRoot ) ) { return $ path ; } $ path = str_replace ( urlencode ( ltrim ( $ path , '/' ) ) , urldecode ( ltrim ( $ path , '/' ) ) , $ this -> router -> generate ( '_imagine_' . $ filter , array ( 'path' => ltrim ( $ path , '/' ) ) , $ absolute ) ) ; $ cached = realpath ( $ this -> webRoot . $ path ) ; if ( file_exists ( $ cached ) && ! is_dir ( $ cached ) && filemtime ( $ realPath ) > filemtime ( $ cached ) ) { unlink ( $ cached ) ; } return $ path ; }
Gets filtered path for rendering in the browser

@param string $path
@param string $filter
@param boolean $absolute
Gets filtered path for rendering in the browser