title: CodeIgniter: invoking multiple controllers in one call
body: <p>I am solving a kind of architectural problem inside CI.
  I need to be able to instantiate other controllers and their methods in main controller.
  E.g.</p>
  
  <pre><code>*main.php/function index():*
  $controller2 = new Controller2();
  $data['pre_loaded_data'] = $controller2 -&gt;ajax_get_some_view(array('static'=&gt;true));
  </code></pre>
  
  <p>The goal behind this approach is to build ajax application which loads some screen parts
  statically at first load, as part of main html page, but later these parts are updated with ajax methods to from various other controllers(at this time with array('static'=>false) param), e.g as reponse to onclick event on main page.</p>
  
  <p>The problem is that CI doens't seem to be design to support multiple controllers and throws various loader-related errors reporting that some class is not loaded even when it's loaded.</p>
  
  <p>What would be the best approach to pre-load data from other controllers in the main controller?</p>