[eluser]Tottys Design[/eluser]
[quote author="Michel-Ange" date="1258554989"]@Tottys Design : Loading a model in the Router class goes against the MVC principles of CI.
I had a look to your other post :
First, have a look at the MVC principles : In MVC, the controller "catch" all user entries, manage request / loads data through models and finaly feeds the view, which will be send to the user. The "router" can be see as a dispatcher which is here to understand the request and route to the good controller, nothing more.
A way to do what you want should be to create a main controller, which will load the model in charge of getting the controllers names from database. All other controllers will extends this main controller. With this way of thinking, you will keep the MVC logical without hacking the router lib.
Create a MY_Controller extending Controller in the librairies folder and then use inheritance for your other controllers.[/quote]
So you are saying this:
MY_Controller extends Controller
Core_controller extends My_Controller
and when a request comes, Core_controller loads it and then, how can I load the other controllers the I would need, "gallery"..?