What would be the best way to get all the module/controller/action possible combinations existing in code ?
I was thinking on doing this way:
1. Get all the modules and controller directory for each one using $front->getControllerDirectory()
2. For each controller directory search for all controller files which follow the convention (IndexController.php by example), so to get the class name of controller
3. Get the methods by using get_class_methods, and see which of the functions follow the convention for actions as indexAction
This seems to be the best way to do it ?
Of course, this is ignoring actions using __call, but this is fine for my purpose.
-- Best regards, Cristian Bichis www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
Hi,
I am trying to get all the modules and controller directory for each one.
I saw i can use either:
$front->getControllerDirectory();
$front->getModuleControllerDirectoryName();
Both seems to produce same result, a key value pair of module / controller directory.
What's the difference between those two functions then ?
没有评论:
发表评论