public function StreamedResponse::__construct

Constructor.

@api

Parameters

mixed $callback A valid PHP callback:

integer $status The response status code:

array $headers An array of response headers:

Overrides Response::__construct

File

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

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function __construct($callback = null, $status = 200, $headers = array()) {
  parent::__construct(null, $status, $headers);
  if (null !== $callback) {
    $this
      ->setCallback($callback);
  }
  $this->streamed = false;
}