/**
  * Gets the 'session' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Symfony\Component\HttpFoundation\Session A Symfony\Component\HttpFoundation\Session instance.
  */
 protected function getSessionService()
 {
     $this->services['session'] = $instance = new \Symfony\Component\HttpFoundation\Session($this->get('session.storage'), 'en');
     $instance->start();
     return $instance;
 }
Example #2
0
 /**
  * @param Symfony\Component\HttpFoundation\Session $session
  */
 public function __construct(SymfonySession $session = null)
 {
     $this->session = $session ?: new SymfonySession();
     $this->session->start();
 }