Writes raw headers to output.

Parameters

  • string|array $header 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.
  • integer $code Optional. If present, forces a specific HTTP response code. Used primarily in conjunction with the 'Location' header.

Returns

void

Source

						protected function _writeHeader($header, $code = null) {
		if (is_array($header)) {
			array_map(function($h) { header($h, false); }, $header);
			return;
		}
		$code ? header($header, true) : header($header, true, $code);
	}