diff --git a/src/Symfony/Components/RequestHandler/RequestBag.php b/src/Symfony/Components/RequestHandler/RequestBag.php index 41a71fbb42f3..f5f2d55b8254 100644 --- a/src/Symfony/Components/RequestHandler/RequestBag.php +++ b/src/Symfony/Components/RequestHandler/RequestBag.php @@ -24,7 +24,7 @@ class RequestBag public function __construct($input) { - $this->input = $input; + $this->replace($input); } /** @@ -69,6 +69,16 @@ public function has($key) return array_key_exists($key, $this->input); } + /** + * Deletes a parameter. + * + * @param string $key The key + */ + public function delete($key) + { + unset($this->input[$key]); + } + /** * Returns the alphabetic characters of the parameter value. *