private function filterUri(string $passedUri): string
    {
        //sanitize url
        $url = \filter_var($passedUri, FILTER_SANITIZE_URL);

        //check for rewrite mode
        $url = \str_replace($this->rewriteModeOffRouter, '', $url);

        //remove basepath
        $url = \substr($url, \strlen($this->basePath));

        //remove doubled slash
        $url = \str_replace('//', '/', $url);

        return (\substr($url, 0, 1) === '/') ? $url : '/'.$url;
    }
private function filterUri(string $passedUri): string
    {
        //sanitize url
        $url = \filter_var($passedUri, FILTER_SANITIZE_URL);

        //check for rewrite mode
        $url = \str_replace($this->rewriteModeOffRouter, '', $url);

        //remove basepath
        $url = \substr($url, \strlen($this->basePath));

        //remove doubled slash
        $url = \str_replace('//', '/', $url);

        return (\substr($url, 0, 1) === '/') ? $url : '/'.$url;
    }
private function filterUri ( string $ passedUri ) : string { //sanitize url $ url = \ filter_var ( $ passedUri , FILTER_SANITIZE_URL ) ; //check for rewrite mode $ url = \ str_replace ( $ this -> rewriteModeOffRouter , '' , $ url ) ; //remove basepath $ url = \ substr ( $ url , \ strlen ( $ this -> basePath ) ) ; //remove doubled slash $ url = \ str_replace ( '//' , '/' , $ url ) ; return ( \ substr ( $ url , 0 , 1 ) === '/' ) ? $ url : '/' . $ url ; }
Analize current uri, sanitize and return it.

@param string $passedUri

@return string
Analize current uri sanitize and return it .