Pergunta

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?

Foi útil?

Solução

This solves everything!

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

Posting the answer if someone else needs it.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top