public static function StreamedResponse::create

Factory method for chainability

Example:

return Response::create($body, 200) ->setSharedMaxAge(300);

Parameters

string $content The response content:

integer $status The response status code:

array $headers An array of response headers:

Return value

Response

Overrides Response::create

1 call to StreamedResponse::create()
StreamedResponseTest::testCreate in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php, line 56

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

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