public function StreamedResponse::setCallback

Sets the PHP callback associated with this Response.

Parameters

mixed $callback A valid PHP callback:

1 call to StreamedResponse::setCallback()
StreamedResponse::__construct in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php
Constructor.

File

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

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setCallback($callback) {
  if (!is_callable($callback)) {
    throw new \LogicException('The Response callback must be a valid PHP callable.');
  }
  $this->callback = $callback;
}