src/View/Helper/AssetHelper.php
protected function path($path, $type)
    {
        if (Configure::read('debug') && !Configure::read('Assets.force')) {
            return $path;
        }

        $asset = new AssetsCreator($path, $type);
        $path = '/assets/' . $asset->create();

        //Appends the timestamp
        $stamp = Configure::read('Asset.timestamp');
        if ($stamp === 'force' || ($stamp === true && Configure::read('debug'))) {
            $path = sprintf('%s.%s?%s', $path, $type, filemtime($asset->path()));
        }

        return $path;
    }
protected function path($path, $type)
    {
        if (Configure::read('debug') && !Configure::read('Assets.force')) {
            return $path;
        }

        $asset = new AssetsCreator($path, $type);
        $path = '/assets/' . $asset->create();

        //Appends the timestamp
        $stamp = Configure::read('Asset.timestamp');
        if ($stamp === 'force' || ($stamp === true && Configure::read('debug'))) {
            $path = sprintf('%s.%s?%s', $path, $type, filemtime($asset->path()));
        }

        return $path;
    }
protected function path ( $ path , $ type ) { if ( Configure :: read ( 'debug' ) && ! Configure :: read ( 'Assets.force' ) ) { return $ path ; } $ asset = new AssetsCreator ( $ path , $ type ) ; $ path = '/assets/' . $ asset -> create ( ) ; //Appends the timestamp $ stamp = Configure :: read ( 'Asset.timestamp' ) ; if ( $ stamp === 'force' || ( $ stamp === true && Configure :: read ( 'debug' ) ) ) { $ path = sprintf ( '%s.%s?%s' , $ path , $ type , filemtime ( $ asset -> path ( ) ) ) ; } return $ path ; }
Gets the asset path
@param string|array $path String or array of css/js files
@param string $type `css` or `js`
@return string Asset path
@uses Assets\Utility\AssetsCreator::create()
@uses Assets\Utility\AssetsCreator::path()
Gets the asset path