G
G
Grizmar2014-10-16 19:49:32
Zend Framework
Grizmar, 2014-10-16 19:49:32

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

1 answer(s)
S
Shirshov Alexander, 2014-10-22
@Grizmar

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 question

Ask a Question

731 491 924 answers to any question