[HttpFoundation] tweaked previous merge (refs #8185)
This commit is contained in:
parent
7eb4fdee64
commit
f731d99384
@ -1,6 +1,11 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
2.4.0
|
||||
-----
|
||||
|
||||
* added Request::getEncodings()
|
||||
|
||||
2.3.0
|
||||
-----
|
||||
|
||||
|
@ -117,6 +117,11 @@ class Request
|
||||
*/
|
||||
protected $charsets;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $encodings;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@ -1450,14 +1455,13 @@ class Request
|
||||
* Gets a list of encodings acceptable by the client browser.
|
||||
*
|
||||
* @return array List of encodings in preferable order
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getEncodings()
|
||||
{
|
||||
if (null !== $this->encodings) {
|
||||
return $this->encodings;
|
||||
}
|
||||
|
||||
return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user