title: how to get application instance in symfony2
body: <p>I can't find how to make something like ::getInstance() like in other php frameworks to get Application (singleton) instance in symfony2</p>
  
  <p>I found only sfContext::getInstance() buy it doesn't work and looks like its method from symfony1     </p>
  
  <p>add more info.</p>
  
  <p>I have some class - abstract class Post { }. I want to get some application config, environment variables inside this class. i don't want to put all this  stuff to constructor method, instead i want to call application instance and get all i want   </p>