Welcome Guest, Not a member yet? Register   Sign In
Use the codeigniter library in hook class or function,HOWTO
#1

[eluser]Unknown[/eluser]
Hi all:
How use the codeigniter library in hook class or function, such as database class.
Hook Point: pre_controller.
Tks.
#2

[eluser]Seppo[/eluser]
If you want to use a library, you would need to use a hook at least in post_controller_constructor. There you can be sure the basic core is loaded.
Then you can use get_instance() to get the controller object and access to the libraries.
#3

[eluser]Unknown[/eluser]
Thank you very much, Seppo!
I now understand.




Theme © iAndrew 2016 - Forum software by © MyBB