original_string: public function toUrl($url, $statusCode = 302)
      {
          $server = $this->getServer();
  
          $response = $server->getResponse(false)
              ->withHeader('Location', $url)
              ->withStatus($statusCode);
  
          return $response;
      }
code: public function toUrl($url, $statusCode = 302)
      {
          $server = $this->getServer();
  
          $response = $server->getResponse(false)
              ->withHeader('Location', $url)
              ->withStatus($statusCode);
  
          return $response;
      }
code_tokens: public function toUrl ( $ url , $ statusCode = 302 ) { $ server = $ this -> getServer ( ) ; $ response = $ server -> getResponse ( false ) -> withHeader ( 'Location' , $ url ) -> withStatus ( $ statusCode ) ; return $ response ; }
docstring: Generates redirection by given url.
  
  @param string $url        The url
  @param int    $statusCode Optional; by default 302. The status code
  
  @return \Es\Http\Psr\ResponseInterface The response
docstring_tokens: Generates redirection by given url .