get headers

@return array
774931
private function getHeaders()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $cfg = &$this->cfg;
        $status = &$this->status;
        $this->debug->log('headersCache', $cfg['headersCache']);
        $headers = array();
        if ($cfg['headersCache'] === 'auto') {
            $iCur = $this->persist->get('i');
            $this->debug->log('iCur', $iCur);
            $cfg['headersCache'] = true;
            if ($iCur == 0 && !$status['submitted']) {
                $this->debug->log('First Page && not submitted');
                $cfg['headersCache'] = false;
            }
            if (isset($_SERVER['HTTP_USER_AGENT']) && \preg_match('/ MSIE 6\.\d;/', $_SERVER['HTTP_USER_AGENT'])) {
                $this->debug->log('IE6: do not cache or: will ALWAYS returned cached content.  side-effects: blank fields on back-button & page has expired message');
                $cfg['headersCache'] = false;
            }
            $this->debug->log('headersCache', $cfg['headersCache']);
        }
        if ($cfg['headersCache']) {
            $headers = array(
                // 'Pragma: public',
                'Cache-Control: private, max-age='.(60*30), // .', must-revalidate',
                'Last-Modified: '.\gmdate('D, d M Y H:i:s \G\M\T'),
                'Expires: '.\gmdate('D, d M Y H:i:s \G\M\T', \time()+60*30),
            );
        } else {
            $headers = array(
                // 'Pragma: no-cache',
                'Cache-Control: private, no-cache, no-store',   // HTTP/1.1
                'Expires: Mon, 26 Jul 1997 05:00:00 GMT',       // Date in the past
            );
        }
        $this->debug->groupEnd();
        return $headers;
    }
321328
public function getHeaders()
    {
        $return = array();

        foreach ($this->contents as $key => $value) {
            if (strpos($key, self::$HttpPrefix) === 0) { // @codeCoverageIgnore
                $return[substr($key, strlen(self::$HttpPrefix))] = $value; // @codeCoverageIgnore
            } // @codeCoverageIgnore

            if (in_array($key, self::$HttpCustomHeaders)) {
                $return[$key] = $value;
            }
        }

        return $return;
    }
699935
public function getHeaders()
    {
        $headers = array(
            'FOXY-API-VERSION' => 1
        );
        if ($this->access_token && $this->include_auth_header) {
            $headers['Authorization'] = "Bearer " . $this->access_token;
        }
        $headers['Accept'] = $this->getAcceptContentType();

        return $headers;
    }
1058745
private function getHttpHeaders()
    {
        $ret = array();
        foreach ($this->httpConfig->getHeaders() as $k => $v) {
            $ret[] = "$k: $v";
        }
        return $ret;
    }
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;
	}
43113
public function getRequestHeaders()
  {
    $headers = parent::getRequestHeaders();
    if (!is_null($this->modifiedSince)) {
      $headers['If-Modified-Since'] = $this->modifiedSince->format('r');
    }

    return $headers;
  }
978965
public function get_headers()
	{
		$headers = array();
		foreach ($this->headers as $key => $value)
		{
			$headers[] = is_int($key) ? $value : $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'
        ];
    }
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)
        );
    }
370718
public static function getRequestHeaders()
    {
        if (function_exists('getallheaders')) {
            $headers = array();
            foreach (getallheaders() as $name => $value) {
                $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $name))))] = $value;
            }
            return $headers;
        }
        $headers = array();
        foreach ($_SERVER as $name => $value) {
            if (substr($name, 0, 5) == 'HTTP_') {
                $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
            }
        }
        return $headers;
    }
1113752
protected function getHeaders(): array
    {
        $displayColumns = $this->getDisplayColumns();

        if (empty($displayColumns)) {
            return [];
        }

        $table = TableRegistry::get($this->search->get('model'));

        $associationLabels = Utility::instance()->getAssociationLabels($table);
        $searchableFields = Utility::instance()->getSearchableFields($table, $this->user);

        $result = [];
        foreach ($displayColumns as $column) {
            $label = $column;
            if (array_key_exists($label, $searchableFields)) {
                $label = $searchableFields[$label]['label'];
            }

            list($fieldModel, ) = pluginSplit($column);
            if (array_key_exists($fieldModel, $associationLabels)) {
                $label .= ' (' . $associationLabels[$fieldModel] . ')';
            }

            $result[] = $label;
        }

        return $result;
    }
157548
protected function getAllHeaders()
    {
        if (function_exists('apache_request_headers')) {
            $headers = apache_request_headers();
        } else {
            $headers = array_filter($_SERVER, function($key) {
                return strpos($key, 'HTTP_') === 0;
            }, ARRAY_FILTER_USE_KEY);
        }
        return $headers;
    }
88239
protected function getHttpHeaders()
    {
        $headers = [];
        if (null !== $this->_maxage) {
            $headers['Cache-Control'] = 'max-age=' . $this->_maxage;
        }
        if ($this->_gzipped) {
            $headers['Content-Encoding'] = 'gzip';
        }

        return $headers;
    }
1178874
protected function getAllHeaders()
    {
        $headers = [];

        foreach ($_SERVER as $key => $value) {
            if (substr($key, 0, 5) == 'HTTP_') {
                $key = substr($key, 5);
                $key = str_replace('_', ' ', strtolower($key));
                $key = str_replace(' ', '-', ucwords($key));

                $headers[$key] = $value;
            }
        }

        return $headers;
    }
472349
public function getHttpHeaders()
    {
        $headers = [
            'Content-type' => 'application/json',
        ];

        // Add "WWW-Authenticate" header
        //
        // RFC 6749, section 5.2.:
        // "If the client attempted to authenticate via the 'Authorization'
        // request header field, the authorization server MUST
        // respond with an HTTP 401 (Unauthorized) status code and
        // include the "WWW-Authenticate" response header field
        // matching the authentication scheme used by the client.
        // @codeCoverageIgnoreStart
        if ($this->errorType === 'invalid_client' && array_key_exists('HTTP_AUTHORIZATION', $_SERVER) !== false) {
            $authScheme = strpos($_SERVER['HTTP_AUTHORIZATION'], 'Bearer') === 0 ? 'Bearer' : 'Basic';

            $headers['WWW-Authenticate'] = $authScheme . ' realm="OAuth"';
        }
        // @codeCoverageIgnoreEnd
        return $headers;
    }
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;
    }
598994
public function getRawHeaders()
    {
        $headers = [];

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

        return $headers;
    }