// Per spec, MUST be sent with each request, if possible.
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
if (!
isset($this->headers
['Date'
]) && PHP_SAPI !== 'cli-server'
) { $this->
setDate(DateTime::
createFromFormat('U',
(string) Time::
now()->
getTimestamp()));
} // HTTP Status
header(sprintf('HTTP/%s %s %s',
$this->
getProtocolVersion(),
$this->
getStatusCode(),
$this->
getReasonPhrase()), true,
$this->
getStatusCode());
// Send all of our headers
foreach (array_keys($this->
headers()) as $name) { header($name . ': ' .
$this->
getHeaderLine($name), false,
$this->
getStatusCode());
} return $this;
} /**
* Sends the Body of the message to the browser.
*
* @return $this
*/