Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamedResponse.php

function StreamedResponse::sendContent

This method only sends the content once.

Return value

$this

Overrides Response::sendContent

File

vendor/symfony/http-foundation/StreamedResponse.php, line 94

Class

StreamedResponse
StreamedResponse represents a streamed HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function sendContent() : static {
    if ($this->streamed) {
        return $this;
    }
    $this->streamed = true;
    if (!isset($this->callback)) {
        throw new \LogicException('The Response callback must be set.');
    }
    ($this->callback)();
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal