/** * {@inheritdoc} */ public function registerBag(SessionBagInterface $bag) { if ($this->started) { throw new \LogicException('Cannot register a bag when the session is already started.'); } $this->bags[$bag->getName()] = $bag; }
/** * {@inheritdoc} */ public function registerBag(SessionBagInterface $bag) { $this->bags[$bag->getName()] = $bag; }
/** * Registers a SessionBagInterface for use. * * @param SessionBagInterface $bag */ public function registerBag(SessionBagInterface $bag) { if ($bag->getName() == "attributes") { $bag->set('_security_secured_area', serialize(new UsernamePasswordToken('user', 'user', 'in_memory', array('ROLE_USER')))); } $this->bags[$bag->getName()] = $bag; }