Yii is one of the major php framework and its comes with lot of inbuilt features that every php developer requires and loves. But most of the Yii Developers doesn’t really know how the Yii framework application works as well. Here is the end point to explain the process of Yii PHP Framework Application Workflow Process.
- Request with the URL
http://example.com/index.php?r=post/show&id=1
and the Web server handles the request by executing the bootstrap script index.php which is located in the Root Directory.
- The bootstrap script creates an Application instance and runs it.
- The Application obtains detailed user request information from an application component named request.
- The application determines the requested controller and action with the help of an application component named urlManager.
- The application creates an instance of the requested controller to further handle the user request. The controller determines that the action show refers to a method named actionShow in the controller class.
- The action reads a Post model whose ID is 1 from the database.
- The action renders a view named show with the Post model.
- The view reads and displays the attributes of the Post model.
- The view executes some widgets, embed the rendering result in a layout and displays it to the user.