Welcome Guest, Not a member yet? Register   Sign In
Best place to put AKA reading database from the config file..
#7

[eluser]Narkboy[/eluser]
Hi - thanks for your reply.

As I see it, the problem here is that 1) I need to place the set_configuration call in every controller and 2) the main CI libs, and all auto-load models, libs and helpers are already loaded before I get to the controller.

What I really need is to be able to grab the config variables from the db as early as possible to avoid wasted resources. If the system is in maintenance mode (set in the db) then I need to keep resource usage to an absolute minimum.

I've looked at hooks, but I think the best bet will to extend / replace the main Controller class so that it's constructor laods the config directly, thus avoiding having to call it from each of my controllers, and also ensuring that it's done as early as is feasible.

Thanks again!


Messages In This Thread
Best place to put AKA reading database from the config file.. - by El Forum - 05-06-2009, 04:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB