app\Application::rev PHP Method

rev() public method

Loads a revision'ed asset file, making use of gulp-rev This is a copycat of L5's Elixir, but catered to our directory structure.
public rev ( string $file, string $manifestFile = null ) : string
$file string
$manifestFile string
return string
    public function rev($file, $manifestFile = null)
    {
        static $manifest = null;
        $manifestFile = $manifestFile ?: $this->publicPath() . '/public/build/rev-manifest.json';
        if ($manifest === null) {
            $manifest = json_decode(file_get_contents($manifestFile), true);
        }
        if (isset($manifest[$file])) {
            return $this->staticUrl("public/build/{$manifest[$file]}");
        }
        throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
    }