title: Codeigniter Fatal error: Call to undefined method Pagination::initialize()
body: <p>I am trying to user the Codeigniter pagination and I receive the following error "Fatal error: Call to undefined method Pagination::initialize()".</p>
  
  <p><strong>I found a few post with the same issue but they all stated the solution is to auto load the Pagination class which I am already doing</strong>. The only issue I can think of is that my class uses custom controller "MY_Controller" which extends the CI controller. Below is my code, please help. Thanks in advance.</p>
  
  <p>MY_Controller.php</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class MY_Controller extends CI_Controller {
  
  public function __construct()
  {
      parent::__construct();
  
      $this-&gt;init();
  }
  
  }
  </code></pre>
  
  <p>Main Controller</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Main extends MY_Controller {
  
  function index()
  {
      $this-&gt;display();   
  }
  
  function display()
  {
  //pagination settings
  $config['base_url']    = base_url();
  $config['total_rows']  = 200;
  $config['per_page']    = 50;
  
  $this-&gt;pagination-&gt;initialize($config);
  }
  }
  </code></pre>