protected function redirect(string $ref, array $params = [], string $schema = null)
    {
        $url = $this->link($ref, $params, $schema);

        $response = new Response();
        $response->setCode(Response::CODE_REDIRECT_SEE_OTHER);
        $response->addHeader('Location', $url);

        return $response;
    }
protected function redirect(string $ref, array $params = [], string $schema = null)
    {
        $url = $this->link($ref, $params, $schema);

        $response = new Response();
        $response->setCode(Response::CODE_REDIRECT_SEE_OTHER);
        $response->addHeader('Location', $url);

        return $response;
    }
protected function redirect ( string $ ref , array $ params = [ ] , string $ schema = null ) { $ url = $ this -> link ( $ ref , $ params , $ schema ) ; $ response = new Response ( ) ; $ response -> setCode ( Response :: CODE_REDIRECT_SEE_OTHER ) ; $ response -> addHeader ( 'Location' , $ url ) ; return $ response ; }
Creates a redirect response.

@param string      $ref
@param array       $params
@param string|null $schema

@return Response
Creates a redirect response .