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
Post a Comment