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:----qDXeq9Dg7BP25FkMZ6MSE3BPHkf+XLxwbLpcTgIdXdq2sjGvptlG3wdIlj+DgNpRaf0zQJDq/2P+oNTALVg8LvFgnLboIcZdL84YQ4am2mlcAq7R/BGHbYcfrWSjHlewdhJKFHULHRAJv/kD0ldLu1JZbPKjqNbwix/dMBqAKQzQFrtqDG2Mdy6AZhHdEktq3r2wfzA1S5+2n4ssX+1yH/pL5CnuVIqQ9H9G1HbvsLjLx8gTCSo1F1BBK74Lcre13Mp3G94crxZqCufFFUh6cRNHrZYCc+X7wNqjbq8cp8V67BmSH2WB/pPK0ImPBcaRy3NQOxGKmkH1MjuCEdVPow2kG+6ik81TrwFyoP0N6PvtGznfL550PGtUwWCd8xQXRlgLPYa758b/LWJmPotz+yGgZwP4iq1k1wrpOtf2NEODTUIbnu/NOL9NApfI5xcNiRA+9P3kALlcZJwK5sq6NSaLu5yi+2UwfdZe9SUHsqbzMaKCdGJrccx7Bkl9ElT7ZZ+wsTy/twsg/ibXbXTWdWf5d2JqvyEK9kPJ2rJqsfFwYvh+4VMcmLfHaEq6OmqB9k7ca8Xi2yy62DXz7D1LipQ5nWiAvgzplQ6Btxg8L6LSoFVeqhd0cvchZ2qzrV+A0QyCp4+JbJ4cW0i6NielzupSV2cMuvFgSoESi2jBvAY=----ATTACHMENT:----NzE2NjA3NzI5Nzg4MzI3NiA1NTIyNjk1NzU4MDYyMjE5IDg0Nzg2Nzk2MTk5MDYyODc=