Welcome Guest, Not a member yet? Register   Sign In
Any way to return all controllers in an application?
#2

[eluser]BrianDHall[/eluser]
Sort of yes, sort of no. I guess it would be considered 'non-trivial'.

You would need to build a function that would go through all the files in the controllers folder and look through them, and be sure to use the nomenclature of the sort that if a function begins with _ then it isn't really a page.

Out of the box CI only accesses the one requested controller and function called for by your routing.

I believe this topic is considered 'reflection' for the controller that is loaded, and class/function navigating for the files not loaded. I have intentionally avoided any need to do anything like this as it is a bit of a can of worms, so I can't offer much advice further.

It's one of those 'fun' sorts of projects though like building a REST server in PHP - plenty of people do it, its just I generally find it a lot of work without much bang for the buck.

You might check on code or class navigation in PHP to see some ways to go about it.


Messages In This Thread
Any way to return all controllers in an application? - by El Forum - 10-06-2009, 11:04 AM
Any way to return all controllers in an application? - by El Forum - 10-06-2009, 11:11 AM
Any way to return all controllers in an application? - by El Forum - 10-06-2009, 11:38 AM
Any way to return all controllers in an application? - by El Forum - 10-06-2009, 09:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB