You are here

public function Request::getCharsets in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::getCharsets()

Gets a list of charsets acceptable by the client browser.

Return value

array List of charsets in preferable order

File

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

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(AcceptHeader::fromString($this->headers
    ->get('Accept-Charset'))
    ->all());
}