Welcome Guest, Not a member yet? Register   Sign In
How to make a hook accessible in a controler?
#1

[eluser]doors[/eluser]
I see that alot of classes are accessible through the CI object.

How is that achieved?

he reason is that I would like to make the instantiated HOOK object be accessible in my controllers.

I am using a Post Controller Constructor Hook.


How for Example could I have had access to the DB class by adding these two line of code?

$this->CI =& get_instance();
$this->CI->db->query('select * from table');




Theme © iAndrew 2016 - Forum software by © MyBB