diff --git a/src/Symfony/Component/HttpFoundation/FileBag.php b/src/Symfony/Component/HttpFoundation/FileBag.php index 4baebc8823..118f8fb7d6 100644 --- a/src/Symfony/Component/HttpFoundation/FileBag.php +++ b/src/Symfony/Component/HttpFoundation/FileBag.php @@ -23,6 +23,20 @@ class FileBag extends ParameterBag { private $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + /** + * Constructor. + * + * @param array $headers An array of HTTP files + */ + 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); + } + /** * (non-PHPdoc) * @see Symfony\Component\HttpFoundation\ParameterBag::replace() diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 0d0ff011dc..120a8fc290 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -20,6 +20,20 @@ class ResponseHeaderBag extends HeaderBag { protected $computedCacheControl = array(); + /** + * Constructor. + * + * @param array $headers An array of HTTP headers + */ + 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); + } + /** * {@inheritdoc} */