[HttpFoundation] cleaned up some constructors

This commit is contained in:
Kris Wallsmith 2011-02-15 11:30:31 -08:00 committed by Fabien Potencier
parent ba239905d7
commit c67a9a9643
2 changed files with 4 additions and 8 deletions

View File

@ -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);
} }

View File

@ -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', '');
}
} }
/** /**