public function Request::getCharsets

Gets a list of charsets acceptable by the client browser.

@api

Return value

array List of charsets in preferable order

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 1223

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getCharsets() {
  if (null !== $this->charsets) {
    return $this->charsets;
  }
  return $this->charsets = array_keys($this
    ->splitHttpAcceptHeader($this->headers
    ->get('Accept-Charset')));
}