private function SapiEmitter::emitHeaders in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php \Zend\Diactoros\Response\SapiEmitter::emitHeaders()
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).
Parameters
ResponseInterface $response:
1 call to SapiEmitter::emitHeaders()
- SapiEmitter::emit in vendor/
zendframework/ zend-diactoros/ src/ Response/ SapiEmitter.php - Emits a response for a PHP SAPI environment.
File
- vendor/
zendframework/ zend-diactoros/ src/ Response/ SapiEmitter.php, line 66
Class
Namespace
Zend\Diactoros\ResponseCode
private function emitHeaders(ResponseInterface $response) {
foreach ($response
->getHeaders() as $header => $values) {
$name = $this
->filterHeader($header);
$first = true;
foreach ($values as $value) {
header(sprintf('%s: %s', $name, $value), $first);
$first = false;
}
}
}