BigPipeResponse
class BigPipeResponse extends HtmlResponse (View source)
| internal | This is a temporary solution until a generic response emitter interface is created in https://www.drupal.org/node/2577631. Only code internal to BigPipe should instantiate or type hint to this class. |
A response that is sent in chunks by the BigPipe service.
Note we cannot use \Symfony\Component\HttpFoundation\StreamedResponse because it makes the content inaccessible (hidden behind a callback), which means no middlewares are able to modify the content anymore.
Traits
Provides an implementation of CacheableResponseInterface.
Provides an implementation of AttachmentsInterface.
Properties
| protected CacheableMetadata | $cacheabilityMetadata | The cacheability metadata. |
from CacheableResponseTrait |
| protected array | $attachments | The attachments for this response. |
from AttachmentsTrait |
| protected BigPipe | $bigPipe | The BigPipe service. |
|
| protected HtmlResponse | $originalHtmlResponse | The original HTML response. |
Methods
Returns the original HTML response.
Populates this BigPipeResponse object based on the original HTML response.
{@inheritdoc}
Details
addCacheableDependency($dependency)
{@inheritdoc}
getCacheableMetadata()
{@inheritdoc}
getAttachments()
{@inheritdoc}
addAttachments(array $attachments)
{@inheritdoc}
setAttachments(array $attachments)
{@inheritdoc}
__construct(HtmlResponse $response)
Constructs a new BigPipeResponse.
$this
setContent(mixed $content)
Sets the response content.
HtmlResponse
getOriginalHtmlResponse()
Returns the original HTML response.
protected
populateBasedOnOriginalHtmlResponse()
Populates this BigPipeResponse object based on the original HTML response.
setBigPipeService(BigPipe $big_pipe)
Sets the BigPipe service to use.
sendContent()
{@inheritdoc}