title: How to set session variables for all the controllers in Symfony2?
body: <p>How do I create and access Symfony 2 session variables in my controllers.
  I used like this.</p>
  
  <pre><code>$session = new Session();
  $session-&gt;start();
  $session-&gt;set('loginUserId',$user['user_id']);
  </code></pre>
  
  <p>I want to know how to use the above session variable in all my controllers to access.</p>