G
G
Gorelov2018-08-30 21:45:43
Yii
Gorelov, 2018-08-30 21:45:43

When does the controller call occur?

Hello. I would like to clarify something, perhaps I missed it when reading the documentation and viewing the source code.
When and with the help of what is the call to controllers? It is clear that when the page is opened for the first time,
Yii::createWebApplication($config)->run();
and in the future, if you trace the chain of calls, there will be a call (I apologize for the tautology) of the method runControllerwith the default controller.
But how in the future is the call to other controllers. Let's say if the button was pressed and there was a transition to another tab.
If possible, please provide an example.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-08-30
@Askme23

Goodnight.
Application lifecycle .
Controller lifecycle .

B
Boris Korobkov, 2018-08-30
@BorisKorobkov

When a link is clicked, a new http request is created, index.php is restarted, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question