[eluser]naruto[/eluser]
Hi,
I am not sure if this is possible. I need to be able to read a value from a custom library from a hook in CodeIgniter 1.6.0
This is what my code do at the moment:
Custom library 'abc' is loaded and initialized by controller 'def'. The values that initialized by Controller 'def' need to be accessed by a 'post_controller' hook.
I have tried to use something like this in my hook:
Code:
$CI =& get_instance();
$CI->load->library('abc'); //NOTE: Will this create a new instance of 'abc' ??
$values = $CI->abc->get_values();
That doesn't work, and I keep getting 'undefined property error' from the line '$CI->abc->get_values()'.
Oh, the hook extends Controller:
Code:
class Thehook extends Controller
I am lost now, if someone can help me that would be great.
Cheers,
Naruto