• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.