private function SapiEmitter::emitStatusLine 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::emitStatusLine()
Emit the status line.
Emits the status line using the protocol version and status code from the response; if a reason phrase is availble, it, too, is emitted.
Parameters
ResponseInterface $response:
1 call to SapiEmitter::emitStatusLine()
- 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 45
Class
Namespace
Zend\Diactoros\ResponseCode
private function emitStatusLine(ResponseInterface $response) {
$reasonPhrase = $response
->getReasonPhrase();
header(sprintf('HTTP/%s %d%s', $response
->getProtocolVersion(), $response
->getStatusCode(), $reasonPhrase ? ' ' . $reasonPhrase : ''));
}