I wonder why no one ever asked this question.
Every zend Action function in controller class has 3 paramters, namely ‘module’, ‘controller’, and ‘action’.
What happens, when I get a parameter named ‘action’ from a form or url, for example “?action=edit” ??
I tested it: action holds its value from router, not ‘edit’.
public function someAction() {
$params = $this->getRequest()->getParams();
...
How could I pass the parameter named “action”, if I had to ??
Thanks in advance.
The default route is
Zend_Controller_Router_Route_Modulewhich uses default keys for module, controller, & action:You can see that the default module route has default keys for mvc params, however, it will use the keys set by the request object if it exists and we can modify these keys.
e.g. in your bootstrap:
Now you can use module, controller, & action as
$_GETparams.