Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param string $storageKey         Session storage key.
  * @param string $namespaceCharacter Namespace character to use in keys.
  */
 public function __construct($storageKey = '_sf2_attributes', $namespaceCharacter = '/')
 {
     $this->namespaceCharacter = $namespaceCharacter;
     parent::__construct($storageKey);
 }
Ejemplo n.º 2
0
 /**
  * set an array of additional attributes
  *
  * Each attribute is prefixed before setting in the base bag.
  *
  * @param  array $attributes
  * @return void
  */
 public function setAttributes(array $attributes)
 {
     foreach ($attributes as $name => $value) {
         $this->bag->setAttribute($this->prefix . $name, $value);
     }
 }