title: Asynchronous calls in symfony2
body: <p>How can i call methods asynchronously in symfony2.7 <a href="http://i.stack.imgur.com/3AQSj.jpg" rel="nofollow">Like</a>. </p>
  
  <p>I have to retrieve data making 4 different API connections. The problem is slow response from my application since PHP is synchronous so it has to wait for the response from all the API and then render the data.</p>
  
  <pre><code>class MainController{
  
      public function IndexAction(){
      // make Asynchronous Calls to GetFirstAPIData(),  GetSecondAPIData(), GetThridAPIData()
    }
      public function GetFirstAPIData(){
      // Get data
    }
  
      public function GetSecondAPIData(){
      // Get data
    }
  
      public function GetThridAPIData(){
      // Get data
    }
  }
  </code></pre>