What happens first: init or preDispatch?

I read the answer to the question here , and the wording was a bit confusing. I cut sentences to focus on my question

  • The first preDispatch () is called for instances of Zend_Controller_Plugin_Abstract ...
  • init () from Zend_Controller_Action is called as follows ...
  • This calls the preDispatch () method of the controller ...

Does this mean that in the controller itself , initIt executes the code before the code preDispatch?

Is there a preDispatch that starts first, but not for controller code, only for code that can exist in any external plugins, right?

+3
source share
3 answers

init preDispatch, init ( , ).

, ,

+6

, init preDispatch. : UJ9B7.png

Frontcontroller Zend Framework.

+10

init() , init(), init() preDispatch().

+1

Source: https://habr.com/ru/post/1765435/


All Articles