Zend Framework  3.0
Public Member Functions | List of all members
RedirectResponse Class Reference

Produce a redirect response. More...

Public Member Functions

 __construct ($uri, $status=302, array $headers=[])
 Create a redirect response.
 
- Public Member Functions inherited from Response
 __construct ($body= 'php://memory', $status=200, array $headers=[])
 
 getStatusCode ()
 {}
 
 getReasonPhrase ()
 {}
 
 withStatus ($code, $reasonPhrase= '')
 {}
 

Detailed Description

Produce a redirect response.

Constructor & Destructor Documentation

__construct (   $uri,
  $status = 302,
array  $headers = [] 
)

Create a redirect response.

Produces a redirect response with a Location header and the given status (302 by default).

Note: this method overwrites the `location` $headers value.

Parameters
string | UriInterface$uriURI for the Location header.
int$statusInteger status code for the redirect; 302 by default.
array$headersArray of headers to use at initialization.