Final Class Yiisoft\PsrEmitter\SapiEmitter
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
SapiEmitter sends a response using standard PHP Server API, i.e., with {@see header()} and "echo".
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| emit() | Yiisoft\ |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| DEFAULT_BUFFER_SIZE | 8388608 | Yiisoft\ |
Method Details
| public mixed __construct ( integer|null $bufferSize = null ) | ||
| $bufferSize | integer|null |
The size of the buffer in bytes to send the content of the message body. |
public function __construct(?int $bufferSize = null)
{
if ($bufferSize !== null && $bufferSize < 1) {
throw new InvalidArgumentException('Buffer size must be greater than zero.');
}
$this->bufferSize = $bufferSize ?? self::DEFAULT_BUFFER_SIZE;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.