• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic autoload.php (how to get values from database?)

#1
[eluser]koniciwa[/eluser]
Facing a situation now where I need to allow users to customize the loaded libraries from autoload. These values are stored in the database. The problem is that the database is only loaded after processing the autoload.php file and not before, leaving me with mysql_query() to do the task of retrieving from database. I'm just wondering if there's a better way to do this?

Thanks

#2
[eluser]Michael Wales[/eluser]
Just add your own library loading function to the Controller constructor that pulls the libraries you want to load from the database via Active Record (if that's the route you want to take - I assume so, since you don't want to use mysql_query()).

#3
[eluser]koniciwa[/eluser]
Thanks for pointing me in the right direction.
I've looked everywhere but the obvious Smile

The loader has been ported to a library which is called by a hook. Works great, though I've yet to find the right loading sequence.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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