Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HeaderRequestMatcher.php

function HeaderRequestMatcher::__construct

Parameters

string[]|string $headers A header or a list of headers: Strings can contain a comma-delimited list of headers

File

vendor/symfony/http-foundation/RequestMatcher/HeaderRequestMatcher.php, line 33

Class

HeaderRequestMatcher
Checks the presence of HTTP headers in a Request.

Namespace

Symfony\Component\HttpFoundation\RequestMatcher

Code

public function __construct(array|string $headers) {
    $this->headers = array_reduce((array) $headers, static fn(array $headers, string $header) => array_merge($headers, preg_split('/\\s*,\\s*/', $header)), []);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal