title: Best practice to initialize common controller variables?
body: <p>I am creating a small web application and have some controllers with similar base functionality like user profile retrieving and similar.</p>
  
  <p>At the moment each action have calls to these methods.<br>
  I want to move them to get a better code structure.</p>
  
  <p>But I am not sure what the best practice would be. In my opinion there are two approaches:</p>
  
  <ul>
  <li>create method in parent abstract controller and call them from each inherited controller</li>
  <li>use before filter (can it access class variables?)</li>
  <li>(using <code>connect</code> method)</li>
  </ul>
  
  <p>There is one requirement for the "base" controller, it must receive an instance of Silex Application.</p>
  
  <p>I hope there is a more easier way to do it.<br>
  Thanks in advance for every hints.</p>