Skip to content

Commit

Permalink
[HttpFoundation] added some method for a better BC
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 11, 2012
1 parent 146a502 commit 0f6c50a
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions src/Symfony/Component/HttpFoundation/Session/Session.php
Expand Up @@ -245,4 +245,62 @@ public function getFlashes()
{
return $this->getBag('flashes');
}

// the following methods are kept for compatibility with Symfony 2.0 (they will be removed for Symfony 2.3)

/**
* @deprecated
*/
public function getFlashes()
{
return $this->getBag('flashes')->all();
}

/**
* @deprecated
*/
public function setFlashes($values)
{
$this->getBag('flashes')->setAll($values);
}

/**
* @deprecated
*/
public function getFlash($name, $default = null)
{
return $this->getBag('flashes')->get($name, $default);
}

/**
* @deprecated
*/
public function setFlash($name, $value)
{
$this->getBag('flashes')->set($name, $value);
}

/**
* @deprecated
*/
public function hasFlash($name)
{
return $this->getBag('flashes')->has($name);
}

/**
* @deprecated
*/
public function removeFlash($name)
{
$this->getBag('flashes')->get($name);
}

/**
* @deprecated
*/
public function clearFlashes()
{
return $this->getBag('flashes')->clear();
}
}

0 comments on commit 0f6c50a

Please sign in to comment.