Get headers

@return array
@access public
356794
public function getHeaders()
    {
        $headers = array();
        $matches = array();
        if (preg_match_all('/([\w-]+): (.*)/', $this->lastHeader, $matches)) {
            for ($i = count($matches[0]) - 1; $i >= 0; $i--) {
                $headers[strtolower($matches[1][$i])] = $matches[2][$i];
            }
        }
        return $headers;
    }
1218141
public function headers(): array
    {
        return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) {
            return [$header => $values[0]];
        })->all();
    }
124364
public function getAllowheaders()
    {
        $requestHeaders = $this->request->getAccessControlRequestHeaders();
        if (in_array('*', $this->allowedHeaders) && $requestHeaders) {
            return $requestHeaders;
        }

        return $this->allowedHeaders;
    }
955044
protected function getHeaders()
    {
        if (function_exists('getallheaders')) {
            return getallheaders();
        }
        $arr_headers = [];
        foreach ($_SERVER as $str_key => $str_value) {
            if (strpos($str_key, 'HTTP_') === 0) {
                $arr_headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($str_key, 5)))))] = $str_value;
            }
        }
        return $arr_headers;
    }
135193
public function getHeaders(): array
	{
		$headers = [];

		foreach($this->parameters as $key => $value)
		{
			if(strpos($key, 'HTTP_') === 0)
			{
				$headers[substr($key, 5)] = $value;
			}
			elseif(in_array($key, ['CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE']))
			{
				$headers[$key] = $value;
			}
		}

		return $headers;
	}
40526
public function headers(): array
    {
        return array_map(
                function($header)
                {
                    return new Header($header->getName(), $header->getDescription());
                },
                $this->annotations->named('Header')
        );
    }
1259510
public function getHeaders()
    {
        if ($this->headers) {
            return $this->headers;
        }

        $this->headers = [
            'STATUS' => $this->code(),
        ];

        $originHeaders = explode("\r\n\r\n", $this->originHeaders);
        $originHeader = array_pop($originHeaders);
        foreach (explode("\r\n", $originHeader) as $i => $header) {
            if ($i == 0 || !$header) {
                continue;
            }

            $header = explode(':', $header, 2);
            $header[0] = strtoupper($header[0]);
            if ($header[0] == 'SET-COOKIE') {
                $this->headers[$header[0]][] = isset($header[1]) ? trim($header[1]) : '';
            } else {
                $this->headers[$header[0]] = isset($header[1]) ? trim($header[1]) : '';
            }
        }

        return $this->headers;
    }
685428
protected function _getHeaders()
    {
        $out = [];
        foreach ($this->headers as $key => $values) {
            $out[$key] = implode(',', $values);
        }

        return $out;
    }
598994
public function getRawHeaders()
    {
        $headers = [];

        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }

        return $headers;
    }
700197
public static function get_headers() {
    $headers = OAuthUtil::get_headers_internal();
    if ( ! is_array($headers) ) return $headers;
    if ( (! isset($headers['Authorization'])) && isset($headers['X-Oauth1-Authorization']) ) {
        $headers['Authorization'] = $headers['X-Oauth1-Authorization'];
    }
    return $headers;
  }
928588
public function extractHeaders()
    {
        $headers = [];
        foreach (array_keys($this->cors) as $headerField) {
            $headerData = $this->request->getHeaderLine($headerField);
            if ($headerData !== null) {
                $headers[$headerField] = $headerData;
            }
        }

        return $headers;
    }
558282
public function toHeaders()
    {
        $headers = [];
        foreach ($this->responseCookies as $name => $properties) {
            $headers[] = $this->toHeader($name, $properties);
        }
        return $headers;
    }
1051796
public function getHeaders() : array
    {
        $headers = [];

        foreach ($this->headers as $name => $values) {
            $name = implode('-', array_map('ucfirst', explode('-', strtolower($name))));
            $headers[$name] = $values;
        }

        return $headers;
    }
1132875
public function getHeadersForRequest(): array
    {
        $headers = $this->headers;

        array_walk($headers, function (&$value, $name) {
            $value = "$name: $value";
        });

        return $headers;
    }
764391
public function getHeaders(): Headers
    {
        if (null === $this->headers) {
            $this->headers = new Headers(\imap_rfc822_parse_headers($this->getRawHeaders()));
        }

        return $this->headers;
    }
550695
public function getHeaders()
    {
        $headers = static::getDefaultHeaders();

        if ($this->eTag) {
            $headers['If-None-Match'] = $this->eTag;
        }

        return array_merge($this->headers, $headers);
    }
906346
public function getHeaders()
    {
        $headerFields = array_keys($this->headers);
        
        $result = array();
        foreach ($headerFields as $field) {
            $result[] = sprintf('%s: %s', $field, $this->getHeader($field));
        }
        
        return $result;
    }