function Request::initializeFormats
Initializes HTTP request formats.
4 calls to Request::initializeFormats()
- Request::getFormat in vendor/
symfony/ http-foundation/ Request.php - Gets the format associated with the mime type.
- Request::getMimeType in vendor/
symfony/ http-foundation/ Request.php - Gets the mime type associated with the format.
- Request::getMimeTypes in vendor/
symfony/ http-foundation/ Request.php - Gets the mime types associated with the format.
- Request::setFormat in vendor/
symfony/ http-foundation/ Request.php - Associates a format with mime types.
File
-
vendor/
symfony/ http-foundation/ Request.php, line 1910
Class
- Request
- Request represents an HTTP request.
Namespace
Symfony\Component\HttpFoundationCode
protected static function initializeFormats() : void {
static::$formats = [
'html' => [
'text/html',
'application/xhtml+xml',
],
'txt' => [
'text/plain',
],
'js' => [
'application/javascript',
'application/x-javascript',
'text/javascript',
],
'css' => [
'text/css',
],
'json' => [
'application/json',
'application/x-json',
],
'jsonld' => [
'application/ld+json',
],
'xml' => [
'text/xml',
'application/xml',
'application/x-xml',
],
'rdf' => [
'application/rdf+xml',
],
'atom' => [
'application/atom+xml',
],
'rss' => [
'application/rss+xml',
],
'form' => [
'application/x-www-form-urlencoded',
'multipart/form-data',
],
];
}