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

Breadcrumb

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

function AcceptHeader::get

Returns given value's item, if exists.

File

vendor/symfony/http-foundation/AcceptHeader.php, line 82

Class

AcceptHeader
Represents an Accept-* header.

Namespace

Symfony\Component\HttpFoundation

Code

public function get(string $value) : ?AcceptHeaderItem {
    return $this->items[$value] ?? $this->items[explode('/', $value)[0] . '/*'] ?? $this->items['*/*'] ?? $this->items['*'] ?? null;
}

API Navigation

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