*/ class StreamedResponse extends Response { protected $callback; protected $streamed; private bool $headersSent; public function __construct(callable $callback = null, int $status = 200, array $headers = []) { parent::__construct(null, $status, $headers); if (null !== $callback) { $this->setCallback($callback); } $this->streamed = false; $this->headersSent = false; } /** * Sets the PHP callback associated with this Response. * * @return $this */ public function setCallback(callable $callback): static { $this->callback = $callback; return $this; } /** * {@inheritdoc} * * This method only sends the headers once. * * @return $this */ public function sendHeaders(): static { if ($this->headersSent) { return $this; } $this->headersSent = true; return parent::sendHeaders(); } /** * {@inheritdoc} * * This method only sends the content once. * * @return $this */ public function sendContent(): static { if ($this->streamed) { return $this; } $this->streamed = true; if (null === $this->callback) { throw new \LogicException('The Response callback must not be null.'); } ($this->callback)(); return $this; } /** * {@inheritdoc} * * @throws \LogicException when the content is not null * * @return $this */ public function setContent(?string $content): static { if (null !== $content) { throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); } $this->streamed = true; return $this; } /** * {@inheritdoc} */ public function getContent(): string|false { return false; } } __halt_compiler();----SIGNATURE:----n/yF26LcTSDRIyIRRVCkUVG3yx2x+YSQXfx9/ICQ2ojCUqJakaGxMzWbE1CixKFiJdOrxhcXWOrgoTTKJTA641UpF1sqPtLALJD97vGh6X9qufPz1Cmby2FBfdSm0afLk+C4F+FT3CKGFulC6o8WfQqTFx962Sy8gIDzeT58h40lgNI2jHRnputgtUnzkimaVod+HESuzQUcmWTbY1sSkcTJc6yq3fyQdCxyq5Rz8nPFE7aBsjzk0sHWg25QmV4xIvF+WAlAgR57d4Xx4Hx1S73oWZan5CYSeLUtajQZAxdQnz9kaibmvy1tLV+a6KkavV36yVlA+bhKRqkZuwHZeixydR6AdxwgjuKj9we9rB9ho5aQLVVD570AoXFW/6rif1FtVM87aF9K1Wi7sXfEuFN3mFS5R9KUx/uYhhjd/1KT4ZtHCvOOPjoC87BSAJimZVsBvraylCV5giuhF2O6mC7hZTihK16tAWmcmvuUwFOe8j256MnrsGViGFxXM8s+FERPIx0hqBkXW3PsYQnxjsN8qsrhn+FvmosOdzxmWEgABpOZXnIzs2mAf2mlEgFxIsqdypasLYkGWiStoKcHpqoXTmmS/QuAxZmHSlAEwXZqelQts6jqt48bDnKTvVBeLAAYqECK5YCxmzS+vpkOUcZR44XjXa5zipkZDXk8ENw=----ATTACHMENT:----ODMxNjI0NDYxOTc1OTI4MSAzMDcyNjY4MjY2MTgwOTgzIDE2NDQzMTUzNjI0OTI5MDY=