Reputation: 14834
so you can add routes in zend framework with Zend Router's addRoute() method...
but what if I want to get a list of all the defined routes? is there a method that I can use to do so?
Upvotes: 5
Views: 2319
Reputation: 2248
If you are using the Rewrite routing you can call getRoutes()
in Zend_Controller_Router_Rewrite
. This will give you an array of all chained routes.
Upvotes: 5
Reputation: 981
In Zend Framework 1.11 you can get the router from the Front Controller like this:
$router = Zend_Controller_Front::getInstance()->getRouter();
You can get the routes with the getRoutes method:
$routes = $router->getRoutes();
Upvotes: 0