Вопрос

Is it possible from a controller to get the routes to all other controllers? What I need is to fetch the "/customer/:customer_id/" path.

I have scanned the controller folder so I know the names of all my controllers.

Any suggestions?

Это было полезно?

Решение

This solves everything!

$router = Zend_Controller_Front::getInstance()->getRouter();
$route =  $router->getRoute($controllerName);
$route->getRouteUri();

Posting the answer if someone else needs it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top