public static function BinaryFileResponse::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

2 calls to BinaryFileResponse::create()
BinaryFileResponseTest::testConstruction in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
BinaryFileResponseTest::testXSendfile in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php, line 59

Class

BinaryFileResponse
BinaryFileResponse represents an HTTP response delivering a file.

Namespace

Symfony\Component\HttpFoundation

Code

public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) {
  return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified);
}