Skip to content

Commit

Permalink
[RequestHandler] added a way to delete a parameter from a RequestBag …
Browse files Browse the repository at this point in the history
…instance
  • Loading branch information
fabpot committed Apr 25, 2010
1 parent 711b3d3 commit 3074f12
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Symfony/Components/RequestHandler/RequestBag.php
Expand Up @@ -24,7 +24,7 @@ class RequestBag

public function __construct($input)
{
$this->input = $input;
$this->replace($input);
}

/**
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 3074f12

Please sign in to comment.