Stream
class Stream implements ResponseSenderInterface
Stream response.
Properties
protected bool | $isCGI | Is PHP running as a CGI program? | |
protected Closure | $stream | Stream. | |
protected string|null | $contentType | Content type. | |
protected string|null | $charset | Character set. |
Methods
__construct(Closure $stream, string|null $contentType = null, string|null $charset = null)
Constructor.
string|null
getType()
Returns the response content type.
setCharset(string $charset)
Sets the response character set.
string|null
getCharset()
Returns the response character set.
flush(string|null $chunk, bool $flushEmpty = false)
Flushes a chunck of data.
flow()
Sends the stream.
Details
at line 62
__construct(Closure $stream, string|null $contentType = null, string|null $charset = null)
Constructor.
at line 77
Stream
setType(string $contentType)
Sets the response content type.
at line 89
string|null
getType()
Returns the response content type.
at line 100
Stream
setCharset(string $charset)
Sets the response character set.
at line 112
string|null
getCharset()
Returns the response character set.
at line 123
flush(string|null $chunk, bool $flushEmpty = false)
Flushes a chunck of data.
at line 148
protected
flow()
Sends the stream.