public function Request::getAcceptableContentTypes

Gets a list of content types acceptable by the client browser

@api

Return value

array List of content types in preferable order

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

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