Welcome Guest, Not a member yet? Register   Sign In
Custom Library Question
#2

[eluser]Ben Edmunds[/eluser]
Yes, you have to instantiate the CI super-object.

In your library simple do

Code:
protected $ci;

function __construct() {
   $this->ci =& get_instance();
}

Then to use native CI function simple do

Code:
$this->ci->function();

like

Code:
$this->ci->load->model('your_model');
$this->ci->your_model->get_something();


Messages In This Thread
Custom Library Question - by El Forum - 10-30-2009, 08:29 PM
Custom Library Question - by El Forum - 10-30-2009, 08:45 PM
Custom Library Question - by El Forum - 10-30-2009, 11:19 PM
Custom Library Question - by El Forum - 10-30-2009, 11:52 PM
Custom Library Question - by El Forum - 10-31-2009, 06:53 AM
Custom Library Question - by El Forum - 10-31-2009, 11:49 AM
Custom Library Question - by El Forum - 10-31-2009, 05:27 PM
Custom Library Question - by El Forum - 10-31-2009, 06:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB