headersSent($filename, $line)) { assert(is_string($filename) && is_int($line)); throw EmitterException::forHeadersSent($filename, $line); } if (ob_get_level() > 0 && ob_get_length() > 0) { throw EmitterException::forOutputSent(); } } /** * Emit the status line. * * Emits the status line using the protocol version and status code from * the response; if a reason phrase is available, it, too, is emitted. * * It is important to mention that this method should be called after * `emitHeaders()` in order to prevent PHP from changing the status code of * the emitted response. * * @see \Laminas\HttpHandlerRunner\Emitter\SapiEmitterTrait::emitHeaders() */ private function emitStatusLine(ResponseInterface $response): void { $reasonPhrase = $response->getReasonPhrase(); $statusCode = $response->getStatusCode(); $this->header(sprintf( 'HTTP/%s %d%s', $response->getProtocolVersion(), $statusCode, $reasonPhrase ? ' ' . $reasonPhrase : '' ), true, $statusCode); } /** * Emit response headers. * * Loops through each header, emitting each; if the header value * is an array with multiple values, ensures that each is sent * in such a way as to create aggregate headers (instead of replace * the previous). */ private function emitHeaders(ResponseInterface $response): void { $statusCode = $response->getStatusCode(); foreach ($response->getHeaders() as $header => $values) { assert(is_string($header)); $name = $this->filterHeader($header); $first = $name !== 'Set-Cookie'; foreach ($values as $value) { $this->header(sprintf( '%s: %s', $name, $value ), $first, $statusCode); $first = false; } } } /** * Filter a header name to wordcase */ private function filterHeader(string $header): string { return ucwords($header, '-'); } private function headersSent(?string &$filename = null, ?int &$line = null): bool { if (function_exists('Laminas\HttpHandlerRunner\Emitter\headers_sent')) { // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName return \Laminas\HttpHandlerRunner\Emitter\headers_sent($filename, $line); } return headers_sent($filename, $line); } private function header(string $headerName, bool $replace, int $statusCode): void { if (function_exists('Laminas\HttpHandlerRunner\Emitter\header')) { // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName \Laminas\HttpHandlerRunner\Emitter\header($headerName, $replace, $statusCode); return; } header($headerName, $replace, $statusCode); } } __halt_compiler();----SIGNATURE:----L0za+GFgclVZWkVJ21+lg2efRpSzFyrZZo+4iJplapSj1fJKfppmGSedgtnAYA6NyAZ9LIoQW3D4sl37Fs8oYPuuYXtmm7Yz21tVBA2jsRZd5XyOFwQ2Ozf7F1SpSnxV5mjK9hZierZtQFRpcx3Yh1SY7eFsvBNGogmPxOukt++eJt5A/5mCLPmd6oNI8a4rSH9a5oVpCRMyTnu2jLYPMp63uoW327DcMGSa6ZrINqsJeVet5z8nLb675kgKc2sTEvlewc3Ct73JMy1sYgoWVC3j6wPz4zjswX7CCiWly1DoTKgrkOUXLQT6R12QyrNKmWv29jQ2sFMhCwHAFyHs78EliEL+Ld4z+XjFkXH/VESU/aNkcA1ceQJjd9OWe96L0+6KwtL0gm7r0nh98LlAzVWOVVYp2LHEo9uPDMZjSWEfWMc6WR+xAimRpY9mhIUG3CenenabUk47qgIli8XhEEGpdOadk51cjKhMMBL1KdsUucD61lOaNuNgf+4yvhwTs7y+iqeDb2yJpNm5yVUMEF3YXesD3CUwSIuj34mP1Rosll88zn5zX//ngWAaC456KDi+0qd6LDuItfXK2SgrGhYgI8vDqlo0anjuNkVAlMF93Q2NR8oiNxd4OcZs+VhWLaHF8znDdS6wnws6im4Scd7qsaNsfPkL5xPf+L4aw5Y=----ATTACHMENT:----NjMxMzg2MDY3NjYyMjA2NyA0NTA5MjcwOTMwNzk1NjUzIDg0MDUwMTYxOTcwMzM4MDA=