PHP Class Zend\Diactoros\Response\RedirectResponse

Inheritance: extends Zend\Diactoros\Response
Show file Open project: zendframework/zend-diactoros Class Usage Examples

Public Methods

Method Description
__construct ( string | Psr\Http\Message\UriInterface $uri, integer $status = 302, array $headers = [] ) Create a redirect response.

Method Details

__construct() public method

Produces a redirect response with a Location header and the given status (302 by default). Note: this method overwrites the location $headers value.
public __construct ( string | Psr\Http\Message\UriInterface $uri, integer $status = 302, array $headers = [] )
$uri string | Psr\Http\Message\UriInterface URI for the Location header.
$status integer Integer status code for the redirect; 302 by default.
$headers array Array of headers to use at initialization.