public function filterDump(AssetInterface $asset)
    {
        $this->assetDirectory = $this->realPath($asset->getSourceRoot());

        $content = $asset->getContent();

        // Spin through the symlinks and normalize them. We'll first unset the original
        // symlink so that it doesn't clash with the new symlinks once they are added
        // back in.
        foreach ($this->symlinks as $link => $target)
        {
            unset($this->symlinks[$link]);

            if ($link == '//')
            {
                $link = $this->documentRoot;
            }
            else
            {
                $link = str_replace('//', $this->documentRoot.'/', $link);
            }

            $link = strtr($link, '/', DIRECTORY_SEPARATOR);

            $this->symlinks[$link] = $this->realPath($target);
        }

        $content = $this->trimUrls($content);

        $content = preg_replace_callback('/@import\\s+([\'"])(.*?)[\'"]/', array($this, 'processUriCallback'), $content);

        $content = preg_replace_callback('/url\\(\\s*([^\\)\\s]+)\\s*\\)/', array($this, 'processUriCallback'), $content);

        $asset->setContent($content);
    }
public function filterDump(AssetInterface $asset)
    {
        $this->assetDirectory = $this->realPath($asset->getSourceRoot());

        $content = $asset->getContent();

        // Spin through the symlinks and normalize them. We'll first unset the original
        // symlink so that it doesn't clash with the new symlinks once they are added
        // back in.
        foreach ($this->symlinks as $link => $target)
        {
            unset($this->symlinks[$link]);

            if ($link == '//')
            {
                $link = $this->documentRoot;
            }
            else
            {
                $link = str_replace('//', $this->documentRoot.'/', $link);
            }

            $link = strtr($link, '/', DIRECTORY_SEPARATOR);

            $this->symlinks[$link] = $this->realPath($target);
        }

        $content = $this->trimUrls($content);

        $content = preg_replace_callback('/@import\\s+([\'"])(.*?)[\'"]/', array($this, 'processUriCallback'), $content);

        $content = preg_replace_callback('/url\\(\\s*([^\\)\\s]+)\\s*\\)/', array($this, 'processUriCallback'), $content);

        $asset->setContent($content);
    }
public function filterDump ( AssetInterface $ asset ) { $ this -> assetDirectory = $ this -> realPath ( $ asset -> getSourceRoot ( ) ) ; $ content = $ asset -> getContent ( ) ; // Spin through the symlinks and normalize them. We'll first unset the original // symlink so that it doesn't clash with the new symlinks once they are added // back in. foreach ( $ this -> symlinks as $ link => $ target ) { unset ( $ this -> symlinks [ $ link ] ) ; if ( $ link == '//' ) { $ link = $ this -> documentRoot ; } else { $ link = str_replace ( '//' , $ this -> documentRoot . '/' , $ link ) ; } $ link = strtr ( $ link , '/' , DIRECTORY_SEPARATOR ) ; $ this -> symlinks [ $ link ] = $ this -> realPath ( $ target ) ; } $ content = $ this -> trimUrls ( $ content ) ; $ content = preg_replace_callback ( '/@import\\s+([\'"])(.*?)[\'"]/' , array ( $ this , 'processUriCallback' ) , $ content ) ; $ content = preg_replace_callback ( '/url\\(\\s*([^\\)\\s]+)\\s*\\)/' , array ( $ this , 'processUriCallback' ) , $ content ) ; $ asset -> setContent ( $ content ) ; }
Apply a filter on file dump.

@param  \Assetic\Asset\AssetInterface  $asset
@return void
Apply a filter on file dump .