Explain request Life Cycle in Yii2 framework.

devquora
devquora

Posted On: Feb 22, 2018

 

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

  1. Pre-initialize the application with CApplication::preinit();
  2. Set up the error handling;
  3. Register core application components;
  4. Load application configuration;
  5. Initialize the application with CApplication::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;

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Yii 2 Interview Questions

    Which PHP version is required to install Yii 2.0 ?

    Which PHP version is required to install Yii 0 ?..

    Yii 2 Interview Questions

    What is latest version Yii 2 Framework ?

    The latest version of Yii 2 is 2.0.15, released on March 20, 2018...