title: Kohana 3.1: Calling a controller from within another; not returning data
body: <p>I just can't seem to get my head wrapped around this... I have a few questions, please bear with me! :)</p>
  
  <p>First, the setup:<br>
  I have a controller (controllerA) which extends Controller_Template. Inside controllerA's template view I have jQuery tabs which AJAX-loads another controller (controllerB). And then I have a "core" controller which contains functions that I reuse within other controllers (well, I would LIKE TO anyway).</p>
  
  <p>Now for my questions:  </p>
  
  <p><strong>1.</strong> Is it okay (best practice) to be loading the jQuery tab contents like I mentioned above, with:<br>
      <code>&lt;li&gt;&lt;a href="/controller"&gt;test&lt;/a&gt;&lt;/li&gt;</code>?  </p>
  
  <p><strong>2.</strong> In JS and PHP I've always had a 'core' file for reusable code. Is there a better alternative to doing it this way? Should I instead have my core extend Controller and then extend all my controllers off of that? I'm concerned about the overhead though.  </p>
  
  <p><strong>3.</strong> Last, if I call the core with <code>Request::factory()-&gt;execute()-&gt;response()</code>, I get nothing back unless I use something like <code>die($data)</code> instead of <code>return $data</code> it. But if I call that function from within another in the core, it won't work. How can I make it work across the board?</p>
  
  <p>Thanks for your help, as always!</p>
  
  <p>Brian</p>