1.

Explain Request Life Cycle In Yii 2 Framework?

Answer»

When handling a user request, YII 2.0 application will undergo the following stages:

1. Pre-initialize the application with Application::preinit ();
2. Set up the error handling;
3. Register core application COMPONENTS;
4. Load application CONFIGURATION;
5. Initialize the application with Application::INIT()

  • Register application behaviors;
  • Load static application components;

6 Raise an onBeginRequest event;
7. Process the user request.

  • Collect information about the request;
  • Create a controller;
  • Run the controller;

8. Raise an onEndRequest event;

When handling a user request, Yii 2.0 application will undergo the following stages:

1. Pre-initialize the application with Application::preinit ();
2. Set up the error handling;
3. Register core application components;
4. Load application configuration;
5. Initialize the application with Application::init()

6 Raise an onBeginRequest event;
7. Process the user request.

8. Raise an onEndRequest event;



Discussion

No Comment Found