lithium\action\Response::_writeHeaders PHP Method

_writeHeaders() protected method

Writes raw headers to output.
protected _writeHeaders ( string | array $headers, integer $code = null ) : void
$headers string | array Either a raw header string, or an array of header strings. Use an array if a single header must be written multiple times with different values. Otherwise, additional values for duplicate headers will overwrite previous values.
$code integer Optional. If present, forces a specific HTTP response code. Used primarily in conjunction with the 'Location' header.
return void
    protected function _writeHeaders($headers, $code = null)
    {
        foreach ((array) $headers as $header) {
            $code ? header($header, false, $code) : header($header, false);
        }
    }