Skip to content

Commit

Permalink
Docblocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drak committed Feb 11, 2012
1 parent b8df162 commit c59d880
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
31 changes: 24 additions & 7 deletions src/Symfony/Component/HttpFoundation/Session/Session.php
Expand Up @@ -226,11 +226,23 @@ public function unserialize($serialized)
$this->storage = $storage;
}

/**
* Registers a SessionBagInterface with the sessio.
*
* @param SessionBagInterface $bag
*/
public function registerBag(SessionBagInterface $bag)
{
$this->storage->registerBag($bag);
}

/**
* Get's a bag instance.
*
* @param string $name
*
* @return SessionBagInterface
*/
public function getBag($name)
{
return $this->storage->getBag($name);
Expand All @@ -249,61 +261,66 @@ public function getFlashBag()
// the following methods are kept for compatibility with Symfony 2.0 (they will be removed for Symfony 2.3)

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function getFlashes()
{
return $this->getBag('flashes')->all();
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function setFlashes($values)
{
$this->getBag('flashes')->setAll($values);
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function getFlash($name, $default = null)
{
return $this->getBag('flashes')->get($name, $default);
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function setFlash($name, $value)
{
$this->getBag('flashes')->set($name, $value);
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function hasFlash($name)
{
return $this->getBag('flashes')->has($name);
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function removeFlash($name)
{
$this->getBag('flashes')->get($name);
}

/**
* @deprecated
* @deprecated since 2.1, will be removed from 2.3
*/
public function clearFlashes()
{
return $this->getBag('flashes')->clear();
}

/**
* This method does not do anything.
*
* @deprecated since 2.1, will be removed from 2.3
*/
public function close()
{
}
Expand Down
Expand Up @@ -85,6 +85,8 @@ function getBag($name);

/**
* Registers a SessionBagInterface for use.
*
* @param SessionBagInterface $bag
*/
function registerBag(SessionBagInterface $bag);
}

0 comments on commit c59d880

Please sign in to comment.