You are here

public function ModifiedResourceResponse::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/src/ModifiedResourceResponse.php \Drupal\rest\ModifiedResourceResponse::__construct()

Constructor for ModifiedResourceResponse objects.

Parameters

mixed $data: Response data that should be serialized.

int $status: The response status code.

array $headers: An array of response headers.

File

core/modules/rest/src/ModifiedResourceResponse.php, line 29

Class

ModifiedResourceResponse
A response that does not contain cacheability metadata.

Namespace

Drupal\rest

Code

public function __construct($data = NULL, $status = 200, $headers = []) {
  $this->responseData = $data;
  parent::__construct('', $status, $headers);
}