Updated Symfony HttpFoundation to 2.1.6.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute;
|
||||
/**
|
||||
* This class relates to session attribute storage
|
||||
*/
|
||||
class AttributeBag implements AttributeBagInterface
|
||||
class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable
|
||||
{
|
||||
private $name = 'attributes';
|
||||
|
||||
@@ -134,4 +134,24 @@ class AttributeBag implements AttributeBagInterface
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an iterator for attributes.
|
||||
*
|
||||
* @return \ArrayIterator An \ArrayIterator instance
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator($this->attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of attributes.
|
||||
*
|
||||
* @return int The number of attributes
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->attributes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ interface AttributeBagInterface extends SessionBagInterface
|
||||
*
|
||||
* @return Boolean true if the attribute is defined, false otherwise
|
||||
*/
|
||||
function has($name);
|
||||
public function has($name);
|
||||
|
||||
/**
|
||||
* Returns an attribute.
|
||||
@@ -37,7 +37,7 @@ interface AttributeBagInterface extends SessionBagInterface
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function get($name, $default = null);
|
||||
public function get($name, $default = null);
|
||||
|
||||
/**
|
||||
* Sets an attribute.
|
||||
@@ -45,21 +45,21 @@ interface AttributeBagInterface extends SessionBagInterface
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*/
|
||||
function set($name, $value);
|
||||
public function set($name, $value);
|
||||
|
||||
/**
|
||||
* Returns attributes.
|
||||
*
|
||||
* @return array Attributes
|
||||
*/
|
||||
function all();
|
||||
public function all();
|
||||
|
||||
/**
|
||||
* Sets attributes.
|
||||
*
|
||||
* @param array $attributes Attributes
|
||||
*/
|
||||
function replace(array $attributes);
|
||||
public function replace(array $attributes);
|
||||
|
||||
/**
|
||||
* Removes an attribute.
|
||||
@@ -68,5 +68,5 @@ interface AttributeBagInterface extends SessionBagInterface
|
||||
*
|
||||
* @return mixed The removed value
|
||||
*/
|
||||
function remove($name);
|
||||
public function remove($name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user