Welcome Guest, Not a member yet? Register   Sign In
Modular portal based on controller names?
#2

[eluser]eggshape[/eluser]
Hey Daniel -

That's an interesting idea. I am working on a cms with some similar features. One solution is dynamically get any controller's methods with get_class_methods(), which will return the class's functions in an array. You can process this array further to make it an associative array, and then pass it to CI's DB::query() method for insertion. Note, the first element from get_class_methods() is the controller's class name (sweet).

When your controller is called, you can query the database for the appropriate methods to use in the subnav.

It's clear you don't have to store the controller's methods in the DB, but my app is self-documenting (hopefully), and I want it to generate info on each class as well as control a user's access to the methods.

Do you have any other ideas/implementation?


Messages In This Thread
Modular portal based on controller names? - by El Forum - 01-14-2008, 08:26 PM
Modular portal based on controller names? - by El Forum - 01-14-2008, 10:10 PM
Modular portal based on controller names? - by El Forum - 01-15-2008, 03:25 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 03:41 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 07:47 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 10:46 AM
Modular portal based on controller names? - by El Forum - 01-15-2008, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB