You are here

public function EmptyResponse::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php \Zend\Diactoros\Response\EmptyResponse::__construct()

Create an empty response with the given status code.

Parameters

int $status Status code for the response, if any.:

array $headers Headers for the response, if any.:

Overrides Response::__construct

File

vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php, line 26

Class

EmptyResponse
A class representing empty HTTP responses.

Namespace

Zend\Diactoros\Response

Code

public function __construct($status = 204, array $headers = []) {
  $body = new Stream('php://temp', 'r');
  parent::__construct($body, $status, $headers);
}