public function Request::getAcceptableContentTypes in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::getAcceptableContentTypes()
Gets a list of content types acceptable by the client browser.
Return value
array List of content types in preferable order
File
- vendor/
symfony/ http-foundation/ Request.php, line 1643
Class
- Request
- Request represents an HTTP request.
Namespace
Symfony\Component\HttpFoundationCode
public function getAcceptableContentTypes() {
if (null !== $this->acceptableContentTypes) {
return $this->acceptableContentTypes;
}
return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers
->get('Accept'))
->all());
}