src/DotsUnited/BundleFu/Filter/CssUrlRewriteFilter.php
protected function canonicalize($path)
    {
        $parts = array_filter(explode('/', $path));
        $canonicalized = array();

        foreach ($parts as $part) {
            if ('.' == $part) {
                continue;
            }

            if ('..' == $part) {
                array_pop($canonicalized);
            } else {
                $canonicalized[] = $part;
            }
        }

        return implode('/', $canonicalized);
    }
protected function canonicalize($path)
    {
        $parts = array_filter(explode('/', $path));
        $canonicalized = array();

        foreach ($parts as $part) {
            if ('.' == $part) {
                continue;
            }

            if ('..' == $part) {
                array_pop($canonicalized);
            } else {
                $canonicalized[] = $part;
            }
        }

        return implode('/', $canonicalized);
    }
protected function canonicalize ( $ path ) { $ parts = array_filter ( explode ( '/' , $ path ) ) ; $ canonicalized = array ( ) ; foreach ( $ parts as $ part ) { if ( '.' == $ part ) { continue ; } if ( '..' == $ part ) { array_pop ( $ canonicalized ) ; } else { $ canonicalized [ ] = $ part ; } } return implode ( '/' , $ canonicalized ) ; }
Canonicalizes a path.

@param  string $path
@return string
Canonicalizes a path .