public function StreamedResponse::sendContent

This method only sends the content once.

Overrides Response::sendContent

File

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

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function sendContent() {
  if ($this->streamed) {
    return;
  }
  $this->streamed = true;
  if (null === $this->callback) {
    throw new \LogicException('The Response callback must not be null.');
  }
  call_user_func($this->callback);
}