protected static function Request::initializeFormats in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::initializeFormats()
Initializes HTTP request formats.
3 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::setFormat in vendor/
symfony/ http-foundation/ Request.php - Associates a format with mime types.
File
- vendor/
symfony/ http-foundation/ Request.php, line 1843
Class
- Request
- Request represents an HTTP request.
Namespace
Symfony\Component\HttpFoundationCode
protected static function initializeFormats() {
static::$formats = array(
'html' => array(
'text/html',
'application/xhtml+xml',
),
'txt' => array(
'text/plain',
),
'js' => array(
'application/javascript',
'application/x-javascript',
'text/javascript',
),
'css' => array(
'text/css',
),
'json' => array(
'application/json',
'application/x-json',
),
'xml' => array(
'text/xml',
'application/xml',
'application/x-xml',
),
'rdf' => array(
'application/rdf+xml',
),
'atom' => array(
'application/atom+xml',
),
'rss' => array(
'application/rss+xml',
),
'form' => array(
'application/x-www-form-urlencoded',
),
);
}