title: How do you load a helper within a library in codeigniter?
body: <p>I created a library for API access, and I created a seperate helper for common functions used by the library. In codeigniter, new libraries can access native classes by creating an instance of themselves using...</p>
  
  <p>$example_instance = &amp; get_instance(); </p>
  
  <p>I did this, loaded my helper- but every time the helper function is called i get the "trying to access a non-object" error. What am I doing wrong? </p>
  
  <p>Here's what I have</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
  
  class api_example {
  private $api;
  public function __construct(){
      $this-&gt;api = &amp; get_instance();
      $this-&gt;api-&gt;load-&gt;helper('helper_test');
  }   
  
  public function search_recent($param){
  
      $string = $this-&gt;api-&gt;helper_test-&gt;connect($url); //error!!!
  
      return $xml;
  }
  
  
  }
  
  /* End of file  */
  </code></pre>