Compile table search headers.

@return array
337683
protected function compileTableSearchHeaders()
    {
        $search = [];
        foreach ($this->collection->all() as $key => $row) {
            $search[] = $row['searchable'] ? '<th>' . (isset($row->search) ? $row->search : '') . '</th>' : '<th></th>';
        }

        return $search;
    }
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;
    }
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;
    }
1289391
public function getAdditionalHeaders(): array
    {
        $headers = [];
        $tsfe = $this->getTsfe();
        if (!($tsfe instanceof TypoScriptFrontendController)) {
            return $headers;
        }
        // Set headers, if any
        if (\is_array($tsfe->config['config']['additionalHeaders.'])) {
            \ksort($tsfe->config['config']['additionalHeaders.']);
            foreach ($tsfe->config['config']['additionalHeaders.'] as $options) {
                $complete = \trim($options['header']);
                $parts = \explode(':', $complete, 2);
                $headers[\trim($parts[0])] = \trim($parts[1]);
            }
        }

        return $headers;
    }
725130
protected function searchCookiesInHeaders() {
        $headers = $this->holder->getHeaders()->get('set-cookie');

        foreach ($headers as $header) {
            $cookie = $this->createCookieFromHeader($header);

            if ($cookie !== null) {
                $this->storeCookie($cookie);
            }
        }
    }
100048
protected function prepareHeaders()
    {
        $headers = array();

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

        return $headers;
    }
1172021
private function getTableHf()
    {
        if ($this->HFContent) return $this->HFContent;

        ob_start();
        ?>
        <tr>
            <?php // Start constructing the table header columns ?>
            <?php foreach ($this->columns as $column_key => $column_options) : ?>

                <?php $sortable_class = $this->getSortableClass($column_key); ?>

                <th data-column-name="<?php echo $column_key; ?>"
                    class="<?php echo $sortable_class; ?> <?php echo $this->getColumnOption($column_key, self::COLUMN_OPTION_CLASSES); ?>"
                    <?php echo $this->getColumnOption($column_key, self::COLUMN_OPTION_THEAD_ATTR) ?>>

                    <?php echo $this->getColumnHeaderStructure($column_key, $column_options); ?>
                </th>
            <?php endforeach; ?>
        </tr>

        <?php

        $this->HFContent = ob_get_clean();

        return $this->HFContent;
    }
2316
public function toHeaders(): array
    {
        $headers = [];
        foreach ($this as $name => $properties) {
            $headers[] = $this->toHeaderLine($name, $properties);
        }

        return $headers;
    }
754855
private function getTableHeaders(): array
    {
        $result = [];
        foreach ($this->getDisplayColumns() as $column) {
            $label = $column;
            if (array_key_exists($label, $this->searchableFields)) {
                $label = $this->searchableFields[$label]['label'];
            }

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

            $result[] = $label;
        }

        return $result;
    }
617163
protected function getSearchableColumns()
    {
        $columns = $this->getColumns();
        $searchable = [];

        foreach ($columns as $column) {
            if (!$column->searchable) {
                continue;
            }

            $searchable[] = $column;
        }

        return $searchable;
    }
1321618
public function columnSearch()
    {
        $columns = $this->request->get('columns', []);

        foreach ($columns as $index => $column) {

            if (!$this->request->isColumnSearchable($index)) {
                continue;
            }

            $column = $this->getColumnName($index);

            if (isset($this->columnDef['filter'][$column])) {
                $columnDef = $this->columnDef['filter'][$column];
                // get a raw keyword (without wildcards)
                $keyword   = $this->getSearchKeyword($index, true);
                $builder   = $this->getQueryBuilder();

                if ($columnDef['method'] instanceof Closure) {
                    $whereQuery = $builder->newQuery();
                    call_user_func_array($columnDef['method'], [$whereQuery, $keyword]);
                    $builder->addNestedWhereQuery($whereQuery);
                } else {
                    $this->compileColumnQuery(
                            $builder, $columnDef['method'], $columnDef['parameters'], $column, $keyword
                    );
                }
            } else {
                if (count(explode('.', $column)) > 1) {
                    $eagerLoads     = $this->getEagerLoads();
                    $parts          = explode('.', $column);
                    $relationColumn = array_pop($parts);
                    $relation       = implode('.', $parts);
                    if (in_array($relation, $eagerLoads)) {
                        $column = $this->joinEagerLoadedColumn($relation, $relationColumn);
                    }
                }

                $column          = $this->castColumn($column);
                $keyword         = $this->getSearchKeyword($index);
                $caseInsensitive = $this->isCaseInsensitive();

                if (!$caseInsensitive) {
                    $column = strstr($column, '(') ? $this->connection->raw($column) : $column;
                }

                $this->compileColumnSearch($index, $column, $keyword, $caseInsensitive);
            }

            $this->isFilterApplied = true;
        }
    }
1064099
public function all(): array
    {
        $result = [];
        foreach ($this->headers as $header) {
            $result[$header->getName()] = $header->getValuesAsArray();
        }

        return $result;
    }
534654
public function getSearchableRules(): array
    {
        return [
            'roles:[]' => function (Builder $query, array $roles) {
                return $query->whereHas('roles', function (Builder $query) use ($roles) {
                    return $query->whereIn(Role::column('name'), $roles);
                });
            },
        ];
    }
842960
public function getHeaders()
    {
        $result = [];

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

        return $result;
    }
942610
protected function getDefaultHeaders()
    {
        $headers = array();

        $mimeType = $this->calendar->getContentType();
        $headers['Content-Type'] = sprintf('%s; charset=utf-8', $mimeType);

        $filename = $this->calendar->getFilename();
        $headers['Content-Disposition'] = sprintf('attachment; filename="%s', $filename);

        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;
    }
1088644
protected function normalizeCustomHeaders()
    {
        $headers = [];

        // The spec requires that headers are sorted by header name.
        sort($this->headers);
        foreach ($this->headers as $header) {
            if ($this->request->hasHeader($header)) {
                $headers[] = strtolower($header) . ':' . $this->request->getHeaderLine($header);
            }
        }

        return $headers;
    }