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

Breadcrumb

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

function Request::getCharsets

Gets a list of charsets acceptable by the client browser in preferable order.

Return value

string[]

File

vendor/symfony/http-foundation/Request.php, line 1677

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getCharsets() : array {
    return $this->charsets ??= array_map('strval', array_keys(AcceptHeader::fromString($this->headers
        ->get('Accept-Charset'))
        ->all()));
}

API Navigation

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