title: Extends REST_Controller and MY_Controller at once in CodeIgniter
body: <p>I have this situation where I need to access a global function and normally I will do that in MY_Controller for the normal CodeIgniter. But in this case, I am using a REST server and I noticed that the normal controller must extends REST_Controller to make it functioning.</p>
  
  <p><strong>From my AuthController</strong></p>
  
  <pre><code>&lt;?php defined('BASEPATH') OR exit('No direct script access allowed');
  require APPPATH . 'libraries/REST_Controller.php';
  class AuthController extends REST_Controller {}
  </code></pre>
  
  <p><strong>REST_Controller</strong></p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  abstract class REST_Controller extends CI_Controller {}
  </code></pre>
  
  <p>I want to use <code>MY_Controller</code> to create a global function that can be accessed by any controller. For example, from <code>AuthController</code> I want to extend it to <code>MY_Controller</code>, but by doing so I won't be able to use the <code>REST_Controller</code>.</p>
  
  <p>Is there any way I can extend to MY_Controller and REST_Controller at once so that I can use both functions from these two controller?</p>