Answer the question
In order to leave comments, you need to log in
How to replace the preDispatch() function in Zend Framework 2?
in the first Zend Framework there was a preDispatch() function in the controllers, which allowed you to perform the necessary operations before the action was performed, how can it be replaced in the second framework?
Answer the question
In order to leave comments, you need to log in
You can override onDispatch() in controllers. It is he who is responsible for selecting the action in the controller.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question