Get decorated request headers.

@return array
496794
public function getDecoratedHeaders(): array
    {
        $decoratedHeaders = [];
        foreach ($this->headers as $name => $value) {
            $decoratedHeaders[] = $name . ': ' . $value;
        }
        return $decoratedHeaders;
    }
628944
public function getRequestHeaders(): array
    {
        $headers = clone $this->headers();

        if (!$headers->headerExists('Content-type')) {
            if ($contentType = $this->getContentType()) {
                if (($charset = $this->getCharset()) && (stripos($contentType, 'charset=') === false)) {
                    $contentType .= "; charset={$charset}";
                }

                $headers->setHeader('Content-type', $contentType);
            }
        }

        return $headers->getHeadersForRequest();
    }
842960
public function getHeaders()
    {
        $result = [];

        foreach ($this->shadow as $reference => $index) {
            $result[$index] = $this->headers[$reference];
        }

        return $result;
    }
776823
public function getHeadersAsArray()
    {
        $headers = array();
        foreach ($this->getHeaders() as $headerNode) {
            $header = array(
                'type' => $headerNode->getType(),
                'name' => $headerNode->getName(),
                'value' => $headerNode->getValue(),
                'uri' => $headerNode->getUri(),
                'override' => $headerNode->getOverride(),
                'append' => $headerNode->getAppend()
            );
            $headers[$headerNode->getType()][] = $header;
        }
        return $headers;
    }
685428
protected function _getHeaders()
    {
        $out = [];
        foreach ($this->headers as $key => $values) {
            $out[$key] = implode(',', $values);
        }

        return $out;
    }
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;
    }
317209
public function getHeaders()
    {
        $headers = array_merge(
            $this->getRequestLineHeaders(),
            $this->getStandardHeaders(),
            $this->getCookieHeaders()
        );

        return $headers;
    }
40526
public function headers(): array
    {
        return array_map(
                function($header)
                {
                    return new Header($header->getName(), $header->getDescription());
                },
                $this->annotations->named('Header')
        );
    }
468731
public function getHeaders()
    {
        // Define a headers array
        $headers = array();

        foreach ($this->attributes as $key => $value) {
            // Does our server attribute have our header prefix?
            if (self::hasPrefix($key, self::$http_header_prefix)) {
                // Add our server attribute to our header array
                $headers[
                    substr($key, strlen(self::$http_header_prefix))
                ] = $value;

            } elseif (in_array($key, self::$http_nonprefixed_headers)) {
                // Add our server attribute to our header array
                $headers[$key] = $value;
            }
        }

        return $headers;
    }
212511
public function getDefaultHeaders()
    {
        return [
            'User-Agent' => 'plivo-php/' . implode('.',
                    [Version::MAJOR, Version::MINOR, Version::PATCH])
                    . ' (PHP ' . $this->phpVersion . ')',
            'Accept-Encoding' => '*',
            'Content-type' => 'application/json'
        ];
    }
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;
    }
610075
public function getRequestHeaders()
    {
        $headers = array();

        foreach ($this->data->getAll() as $key => $value) {
            if ('HTTP_' === substr($key, 0, 5)) {
                $headers[substr($key, 5)] = $value;
            }
        }

        return $headers;
    }
1196824
public function getHeaders()
    {
        $this->getOptions()->getAuthenticate()->setPostData($this->getPayload());

        $headers = [
            'Content-Type: application/json',
            'Host: tts.eu-west-1.ivonacloud.com',
            'User-Agent: ' . $this->getOptions()->getUserAgent()
        ];

        return array_merge(
            $headers,
            $this->getOptions()->getAuthenticate()->getHeader(self::SERVICE_TYPE_SPEECH)
        );
    }
272413
protected function defaultHeaders()
    {
        if (function_exists('getallheaders')) {
            $headers = getallheaders();
        } elseif (function_exists('http_get_request_headers')) {
            $headers = http_get_request_headers();
        } else {
            $headers = [];
            foreach ($_SERVER as $name => $value) {
                if (strncmp($name, 'HTTP_', 5) === 0) {
                    $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));
                    $headers[$name] = $value;
                }
            }
        }

        return $this->filterHeaders($headers);
    }
505998
public static function get_headers(): array
	{
		if (function_exists('apache_request_headers')) {
			// we need this to get the actual Authorization: header
			// because apache tends to tell us it doesn't exist
			$headers = apache_request_headers();

			// sanitize the output of apache_request_headers because
			// we always want the keys to be Cased-Like-This and arh()
			// returns the headers in the same case as they are in the
			// request
			$out = [];
			foreach ($headers as $key => $value) {
				$key = str_replace(
					' ',
					'-',
					ucwords(strtolower(str_replace('-', ' ', $key)))
				);
				$out[$key] = $value;
			}
		} else {
			// otherwise we don't have apache and are just going to have to hope
			// that $_SERVER actually contains what we need
			$out = [];
			if (isset($_SERVER['CONTENT_TYPE'])) {
				$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
			}
			if (isset($_ENV['CONTENT_TYPE'])) {
				$out['Content-Type'] = $_ENV['CONTENT_TYPE'];
			}

			foreach ($_SERVER as $key => $value) {
				if (substr($key, 0, 5) == 'HTTP_') {
					// this is chaos, basically it is just there to capitalize the first
					// letter of every word that is not an initial HTTP and strip HTTP
					// code from przemek
					$key = str_replace(
						' ',
						'-',
						ucwords(strtolower(str_replace('_', ' ', substr($key, 5))))
					);
					$out[$key] = $value;
				}
			}
		}
		return $out;
	}
812577
public function getHttpHeaders()
    {
        $field = EnumRequestOption::HTTP_HEADERS;
        $http_deaders = isset($this->options[$field]) ? $this->options[$field] : [];

        $http_deaders = array_merge($this->getDefaultHttpHeaders(), $http_deaders);

        return $http_deaders;
    }
300430
public static function GetHeaders () {
		return static::LasyClassVarAccessCallback('headers', function () {
			if (function_exists('apache_request_headers')) {
				$request_header_list = apache_request_headers();
			} else {
				foreach($_SERVER as $key=>$value) {
					if (substr($key, 0, 5) == 'HTTP_') {
						$key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))));
						$request_header_list[$key] = $value;
					}
				}
			}
			return $request_header_list;
		});
	}