[HttpFoundation] cleaned up some constructors
This commit is contained in:
parent
ba239905d7
commit
c67a9a9643
@ -30,10 +30,6 @@ class FileBag extends ParameterBag
|
|||||||
*/
|
*/
|
||||||
public function __construct(array $parameters = array())
|
public function __construct(array $parameters = array())
|
||||||
{
|
{
|
||||||
// this line is not necessary, but including it avoids any stupid
|
|
||||||
// errors if we add code to the parent's constructor
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
$this->replace($parameters);
|
$this->replace($parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ class ResponseHeaderBag extends HeaderBag
|
|||||||
*/
|
*/
|
||||||
public function __construct(array $headers = array())
|
public function __construct(array $headers = array())
|
||||||
{
|
{
|
||||||
// this line is not necessary, but including it avoids any stupid
|
parent::__construct($headers);
|
||||||
// errors if we add code to the parent's constructor
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
$this->replace($headers);
|
if (!isset($this->headers['cache-control'])) {
|
||||||
|
$this->set('cache-control', '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user