@param string $headerName

@return string
437264
private function getHeaderParameterName(string $headerName)
    {
        $replacements = [
            function ($matches) {
                return strtolower($matches[2]);
            },
            function ($matches) {
                return strtoupper($matches[2]);
            },
            function ($matches) {
                return strtoupper($matches[1]);
            },
        ];

        foreach (['/^(X-)?(.*)/i', '/(\-)([\S]{1})/', '/(^[\S]{1})/',] as $index => $pattern) {
            $headerName = preg_replace_callback($pattern, $replacements[$index], $headerName);
        }

        return lcfirst($headerName);
    }
1258322
protected function getHeader(string $padding = '') : string
    {
        $content = (strlen($this->ns) > 0 ? $padding . "namespace $this->ns;\n\n" : '');

        if (count($this->use_list) > 0) {
            sort($this->use_list, SORT_STRING | SORT_FLAG_CASE);
            foreach ($this->use_list as $used) {
                $content .= $padding . "use $used;\n";
            }
            $content .= "\n";
        }

        return $content;
    }
85263
public function getHeader($name)
    {
        $headerName = strtoupper(preg_replace("/[^a-zA-Z0-9_]/", '_', $name));
        return filter_input(INPUT_SERVER, 'HTTP_' . $headerName, FILTER_SANITIZE_SPECIAL_CHARS);
    }
1150821
protected function getTableName($entityName)
    {
        $tableName = $entityName;
        preg_match_all('/[A-Z][a-z]+/', $entityName, $matches);
        if (!empty($matches[0])) {
            $tableName = implode('_', $matches[0]);
        }
        return strtolower($tableName);
    }
260108
private function getHeaders()
    {
        $result = [];
        foreach ($this->headers as $name => $value) {
            $result[] = sprintf("%s: %s", $name, $value);
        }

        return $result;
    }
1060466
public static function normalizeHeaderName($header)
    {
        $filtered = str_replace('-', ' ', $header);
        $filtered = ucwords($filtered);

        return str_replace(' ', '-', $filtered);
    }
792279
public function getHeader($sName)
    {
        $sName = strtolower($sName);
        foreach ($this->getAllHeaders() as $sKey => $mValue) {
            if (strtolower($sKey) === $sName) {
                return $mValue;
            }
        }
        return null;
    }
916747
public String getHeaderValue(final String headerName) {
     if (headerName == null) { return null; }
     return request.headers().get(headerName);
   }
225007
public static function header($name = null)
    {
        if (self::$reqHeaders === null) {
            self::generate();
        }

        if (is_string($name)) {
            $name = strtolower($name);
            return isset(self::$reqHeadersLower[$name]) ? self::$reqHeadersLower[$name] : false;
        }

        return self::$reqHeaders;
    }
587696
protected function seeHeader($headerName, $value = null)
    {
        $headers = $this->response->headers;

        $this->assertTrue($headers->has($headerName), "Header [{$headerName}] not present on response.");

        if (! is_null($value)) {
            $this->assertEquals(
                $headers->get($headerName), $value,
                "Header [{$headerName}] was found, but value [{$headers->get($headerName)}] does not match [{$value}]."
            );
        }

        return $this;
    }
346088
public function getHeader($name)
    {
        $internalName = strtolower($name);

        if (true === $this->hasHeader($internalName)) {
            $value = $this->headers[$internalName];

        } else {
            $value = null;
        }

        return $value;
    }
424257
public function clearHeader($headerName)
    {
        if (isset($this->_headers[$headerName])){
            unset($this->_headers[$headerName]);
        }
        return $this;
    }
1276263
public function generateHeaderId(string $headerText): string
    {

        // $headerText is completely raw markdown input. We need to strip it
        // from all markup, because we are only interested in the actual 'text'
        // part of it.

        // Step 1: Remove html tags.
        $result = strip_tags($headerText);

        // Step 2: Remove all markdown links. To do this, we simply remove
        // everything between ( and ) if the ( occurs right after a ].
        $result = preg_replace('%
            (?<= \\]) # Look behind to find ]
            (
                \\(     # match (
                [^\\)]* # match everything except )
                \\)     # match )
            )

            %x', '', $result);

        // Step 3: Convert spaces to dashes, and remove unwanted special
        // characters.
        $map = [
            ' ' => '-',
            '(' => '',
            ')' => '',
            '[' => '',
            ']' => '',
        ];
        return rawurlencode(strtolower(
            strtr($result, $map)
        ));
    }
177982
public function getMailHeadersAsString()
    {
        $headerString = "";

        foreach ($this->getMailHeaders() as $header => $value) {
            $headerString .= $header . ": " . $value . "\r\n";
        }

        return trim($headerString);
    }
910571
public function getHeadersAsString()
    {
        $headerString = '';
        foreach ($this->getHeaders() as $name => $header) {
            // build up a header string
            $headerString .= $name . ': ' . $header . PHP_EOL;
        }

        return $headerString;
    }
700149
public function getDataAsHeaders($headerName = 'phpdebugbar', $maxHeaderLength = 4096, $maxTotalHeaderLength = 250000)
    {
        $data = rawurlencode(json_encode(array(
            'id' => $this->getCurrentRequestId(),
            'data' => $this->getData()
        )));

        if (strlen($data) > $maxTotalHeaderLength) {
            $data = rawurlencode(json_encode(array(
                'error' => 'Maximum header size exceeded'
            )));
        }

        $chunks = array();

        while (strlen($data) > $maxHeaderLength) {
            $chunks[] = substr($data, 0, $maxHeaderLength);
            $data = substr($data, $maxHeaderLength);
        }
        $chunks[] = $data;

        $headers = array();
        for ($i = 0, $c = count($chunks); $i < $c; $i++) {
            $name = $headerName . ($i > 0 ? "-$i" : '');
            $headers[$name] = $chunks[$i];
        }

        return $headers;
    }
143683
public function getHeader($header_key) {
        if(!isset($this->headers[$header_key]))
            return false;

        return $this->headers[$header_key];
    }