views:

1137

answers:

2

Current state:

  • A router is loaded from xml file
  • two route name within the router are going to the same controller and action, for example: www-language-employee and www-language-trainer are going to the same controller and action --> EmployeeController & listemployeeAction

Problem: - Need to know which route name is dispatched/being used from a request.

Example: 1. http://www.mycompany.com/en/trainers/ Expected return value: www-language-trainer

+3  A: 
Zend_Controller_Front::getInstance()->getRouter()->getCurrentRoute()
Tomáš Fejfar
+4  A: 
Zend_Controller_Front::getInstance()->getRouter()->getCurrentRouteName()
Murat Corlu