| 1 | <?php declare(strict_types = 1); |
||
| 15 | final class ResponseEmitter extends SapiEmitter implements ResponseEmitterContract |
||
| 16 | { |
||
| 17 | use SapiEmitterTrait; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Emits a response for a PHP SAPI environment. |
||
| 21 | * |
||
| 22 | * Emits the status line and headers via the header() function, and the |
||
| 23 | * body content via the output buffer. |
||
| 24 | * |
||
| 25 | * @param ResponseInterface $response |
||
| 26 | * @param null|int $maxBufferLevel Maximum output buffering level to unwrap. |
||
| 27 | */ |
||
| 28 | 3 | public function emit(ResponseInterface $response, $maxBufferLevel = null) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Emit the message body. |
||
| 40 | * |
||
| 41 | * @param ResponseInterface $response |
||
| 42 | */ |
||
| 43 | 3 | private function emitBody(ResponseInterface $response) |
|
| 47 | } |
Overwriting private methods is generally fine as long as you also use private visibility. It might still be preferable for understandability to use a different method name.