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:----HgzeDfsyFYy4Uvnl4kOrmNDpN85ZPig87cozYZpkNatV/OBzL6+TpTPPzWrPF0k5Fwjr6icKvzMRHnV5bU2vTLn83aHfbtFlKyWPMIJhHIvZiZdM9s4vQiGEXsc6dmizeXm/7p7kxaGSvbskCdF4kiVSLC1xMOy5Z0MSETx27D/or92OSh83jmj9hBUWV1pM22SXpXm1xiQVgbitgs71yHDIyncfeaeWqooc9w98cI996SI/ZgtbL+K0naiKL7kYLRVmFtBj6zpD4BqL5aA3r/YNeRfT5eS3g/8I4BMHPeFWNonv/y3aLQwtDflTbKnJkn6V5gyRN/IaSX6CQ1V2wUO9Sb44yz7LVlk7+vUa/v+VdtpWCgOQ8s4/bBJqaZmR22BeZS/h9pRiqivJr+O9OtNK10u8AHaRG9ey6uVarFogi4UdE8V+0ynTlRS2yuRCt6wR/IVv0R9Ugvm5gPzqM1Fb07/WZcT+g97sawN/ozaBeGpr7EKM3k1lM0kOcZbO150fuGhJJszCCrta+dK+6pjVkEAO3WIqLfScge3Ib4BhK3n1u+T3MHRj1fH3hYbyOQOXCOysYNldgIJRmJq5kDZ5AzUzPWI7Q4IOBaTQXkviplRvM3cjhbKK54xwQdrrkdDLU0n2UfZuxrQdCEWO/qWapz+oUY3B/BYhCo8Enes=----ATTACHMENT:----MzU4MjQ5NjUzNjE4MTM2NyA4MzExNzcwMDQ5MDg3MjYxIDU0NjA3NjIxMDkxMzUxMTQ=