public function rewriteNamespacedImports (string $fileContent) : string
    {
        $importParser = new CssUrlImportParser();
        return $importParser->replaceValidImports(
            $fileContent,
            function (string $path)
            {
                try
                {
                    $asset = Asset::createFromAssetPath($path);
                    return $this->assetUrl->generateUrl($asset);
                }
                catch (AssetsException $e)
                {
                    // wasn't an asset path
                    return $path;
                }
            }
        );
    }
public function rewriteNamespacedImports (string $fileContent) : string
    {
        $importParser = new CssUrlImportParser();
        return $importParser->replaceValidImports(
            $fileContent,
            function (string $path)
            {
                try
                {
                    $asset = Asset::createFromAssetPath($path);
                    return $this->assetUrl->generateUrl($asset);
                }
                catch (AssetsException $e)
                {
                    // wasn't an asset path
                    return $path;
                }
            }
        );
    }
public function rewriteNamespacedImports ( string $ fileContent ) : string { $ importParser = new CssUrlImportParser ( ) ; return $ importParser -> replaceValidImports ( $ fileContent , function ( string $ path ) { try { $ asset = Asset :: createFromAssetPath ( $ path ) ; return $ this -> assetUrl -> generateUrl ( $ asset ) ; } catch ( AssetsException $ e ) { // wasn't an asset path return $ path ; } } ) ; }
Rewrites the path to namespaced assets

@param string $fileContent
@return string
Rewrites the path to namespaced assets