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:----btQIE+Rd9Qcj9LmPdZgmZEl8RAH6dkWVV9vpLIUTvGiJbJ+jzMqzQawWdcx5Ba/noQY54lZGiORlMj+l38GvP1ullJ90PcofEC720CBITkwRVtZy1wI05C9W7+N/LpwIk6QjB9hqJV1A3KouXjJ5R3WeejKeUljXycvnUPlGrOas0//jGu3h8X4P6xrNxbe8B6jW9Le1G9BSjrE6AJMO4YuXJ5bT+sIJxaDVv5aoRK0IHXm8e0tT206cUgr8ILFMxy2XYIjs1Izp4plf5JqCkYWgL+qJA1HcfBtwDLm1FV+Vi7uHIQXsNm0llOguVM9/W4StfZY4K1627GHF7lka2DVtedb3nhWezJt4FIlYninAh0sXrYdby6ene/87CWqQ+B8+3s4X9BfSA9hFiuDq5uSxULxm9zEpJ2oqzyTabBesLL/HzdxMjWG502UHLowtMRr/kLzLzAaH/G/ZhW5z2RQ6t90GPxIul63fH3ik5T+krikb3b8i8i81ki8x0H3JILBRfwJp/kBYzfoFy4SpOKgqfcmMoYih9dJ9KPnmHIUo3Sn1oSRqhQRKAEYo59QKOAFc4Ul7R+fwlW/mEvf0bN2i1D534qUW17vNOZCdf2NKGL4akrktO+HRFYFDfObvbRfZ7QU7wo1hFCysstndxP7BlCsfmgzm/tZP4pe11cI=----ATTACHMENT:----NzU5MjM4ODczNDI2NjgzOSAzMDQ2NjE4NzgwMTgyODQ0IDUzMzEwODI5NjM3MDkyNw==