Skip to content

Commit

Permalink
[HttpFoundation] Added removeFlash & clearFlashes methods to the Session
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored and fabpot committed Jan 5, 2011
1 parent c77fb2d commit 584769d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Symfony/Component/HttpFoundation/Session.php
Expand Up @@ -236,6 +236,16 @@ public function hasFlash($name)
return array_key_exists($name, $this->attributes['_flash']);
}

public function removeFlash($name)
{
unset($this->attributes['_flash'][$name]);
}

public function clearFlashes()
{
$this->attributes['_flash'] = array();
}

public function save()
{
if (true === $this->started) {
Expand Down

0 comments on commit 584769d

Please sign in to comment.