public function toPath($path)
    {
        $uri = $this->request->getUri()->withPath($path);

        return $this->toAbsoluteUri($uri);
    }
public function toPath($path)
    {
        $uri = $this->request->getUri()->withPath($path);

        return $this->toAbsoluteUri($uri);
    }
public function toPath ( $ path ) { $ uri = $ this -> request -> getUri ( ) -> withPath ( $ path ) ; return $ this -> toAbsoluteUri ( $ uri ) ; }
redirects to a path in string.
uses current hosts and scheme.

@param string                  $path
@return ResponseInterface
redirects to a path in string . uses current hosts and scheme .