src/UriHandler.php
private function fetchTarget(UriInterface $uri): string
    {
        $path = $uri->getPath();

        if (empty($path) || $path[0] !== '/') {
            $path = '/' . $path;
        }

        if ($this->matchHost) {
            $uri = $uri->getHost() . $path;
        } else {
            $uri = substr($path, strlen($this->prefix));
        }

        return trim($uri, '/');
    }
private function fetchTarget(UriInterface $uri): string
    {
        $path = $uri->getPath();

        if (empty($path) || $path[0] !== '/') {
            $path = '/' . $path;
        }

        if ($this->matchHost) {
            $uri = $uri->getHost() . $path;
        } else {
            $uri = substr($path, strlen($this->prefix));
        }

        return trim($uri, '/');
    }
private function fetchTarget ( UriInterface $ uri ) : string { $ path = $ uri -> getPath ( ) ; if ( empty ( $ path ) || $ path [ 0 ] !== '/' ) { $ path = '/' . $ path ; } if ( $ this -> matchHost ) { $ uri = $ uri -> getHost ( ) . $ path ; } else { $ uri = substr ( $ path , strlen ( $ this -> prefix ) ) ; } return trim ( $ uri , '/' ) ; }
Part of uri path which is being matched.

@param UriInterface $uri
@return string
Part of uri path which is being matched .