You are here

public static function Response::create in RESTful 7.2

Factory.

Parameters

mixed $content: The response content, see setContent()

int $status: The response status code

array $headers: An array of response headers

Return value

ResponseInterface The created object.

Throws

UnprocessableEntityException When the HTTP status code is not valid

Overrides ResponseInterface::create

1 call to Response::create()
RestfulManager::createFromGlobals in src/RestfulManager.php
Factory method.

File

src/Http/Response.php, line 147
Contains \Drupal\restful\Http\Response.

Class

Response

Namespace

Drupal\restful\Http

Code

public static function create($content = '', $status = 200, $headers = array()) {
  return new static($content, $status, $headers);
}