protected function getName($config, $url)
    {
        $parts = explode('.', $url);
        if (count($parts) < 2) {
            return false;
        }

        $path = $config->cachePath($parts[(count($parts) - 1)]);
        if (empty($path)) {
            return false;
        }

        $root = str_replace('\\', '/', WWW_ROOT);
        $path = str_replace('\\', '/', $path);
        $path = str_replace($root, '', $path);
        if (strpos($url, $path) !== 0) {
            return false;
        }

        return str_replace($path, '', $url);
    }
protected function getName($config, $url)
    {
        $parts = explode('.', $url);
        if (count($parts) < 2) {
            return false;
        }

        $path = $config->cachePath($parts[(count($parts) - 1)]);
        if (empty($path)) {
            return false;
        }

        $root = str_replace('\\', '/', WWW_ROOT);
        $path = str_replace('\\', '/', $path);
        $path = str_replace($root, '', $path);
        if (strpos($url, $path) !== 0) {
            return false;
        }

        return str_replace($path, '', $url);
    }
protected function getName ( $ config , $ url ) { $ parts = explode ( '.' , $ url ) ; if ( count ( $ parts ) < 2 ) { return false ; } $ path = $ config -> cachePath ( $ parts [ ( count ( $ parts ) - 1 ) ] ) ; if ( empty ( $ path ) ) { return false ; } $ root = str_replace ( '\\' , '/' , WWW_ROOT ) ; $ path = str_replace ( '\\' , '/' , $ path ) ; $ path = str_replace ( $ root , '' , $ path ) ; if ( strpos ( $ url , $ path ) !== 0 ) { return false ; } return str_replace ( $ path , '' , $ url ) ; }
Returns the build name for a requested asset

@param \MiniAsset\AssetConfig $config The config object to use.
@param string $url The url to get an asset name from.
@return bool|string false if no build can be parsed from URL
with url path otherwise
Returns the build name for a requested asset