Ejemplo n.º 1
0
 /**
  * {@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;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function registerBag(SessionBagInterface $bag)
 {
     $this->bags[$bag->getName()] = $bag;
 }
Ejemplo n.º 3
0
    /**
     * 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;
    }