Пример #1
0
 public function testGetSetName()
 {
     $this->assertEquals('flashes', $this->bag->getName());
     $this->bag->setName('foo');
     $this->assertEquals('foo', $this->bag->getName());
 }
Пример #2
0
 /**
  * Constructeur.
  * 
  * @param \Symfony\Component\HttpFoundation\Session\SessionInterface        $session  Session
  * @param \Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface $flashBag FlashBag
  */
 public function __construct(SessionInterface $session, FlashBagInterface $flashBag = null)
 {
     $this->sessionFlashBag = $session->getBag($flashBag->getName());
 }