CI_Output::get_header PHP Method

get_header() public method

Get Header
public get_header ( $header ) : string
return string
    public function get_header($header)
    {
        // Combine headers already sent with our batched headers
        $headers = array_merge(array_map('array_shift', $this->headers), headers_list());
        if (empty($headers) or empty($header)) {
            return NULL;
        }
        for ($i = 0, $c = count($headers); $i < $c; $i++) {
            if (strncasecmp($header, $headers[$i], $l = strlen($header)) === 0) {
                return trim(substr($headers[$i], $l + 1));
            }
        }
        return NULL;
    }