php - get current controller -


in function want reach current controller:

$front = zend_controller_front::getinstance(); 

this gives handler not current controller.

i changed code function inside of controller. , asked origins both handler got getinstance , this

var_dump(get_class($front), get_class($this)); 

i get:

string 'zend_controller_front' (length=21) string 'indexcontroller' (length=15) 

how can reach real initiated front controller?

i cant pass parameter, because function used trillion times.

zend_controller_front::getinstance()->getrequest()->getcontrollername(); 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -