src/Zicht/Bundle/UrlBundle/Url/Rewriter.php
public function extractPath($url)
    {
        $parts = $this->parseUrl($url);

        if (!isset($parts['path'])) {
            return null;
        }
        // ignore non-http schemes
        if (isset($parts['scheme']) && !in_array($parts['scheme'], ['http', 'https'])) {
            return null;
        }

        return $parts['path'];
    }
public function extractPath($url)
    {
        $parts = $this->parseUrl($url);

        if (!isset($parts['path'])) {
            return null;
        }
        // ignore non-http schemes
        if (isset($parts['scheme']) && !in_array($parts['scheme'], ['http', 'https'])) {
            return null;
        }

        return $parts['path'];
    }
public function extractPath ( $ url ) { $ parts = $ this -> parseUrl ( $ url ) ; if ( ! isset ( $ parts [ 'path' ] ) ) { return null ; } // ignore non-http schemes if ( isset ( $ parts [ 'scheme' ] ) && ! in_array ( $ parts [ 'scheme' ] , [ 'http' , 'https' ] ) ) { return null ; } return $ parts [ 'path' ] ; }
Extract the path of the URL which is considered for aliasing.

@param string $url
@return string|null
Extract the path of the URL which is considered for aliasing .