Here is a typical workflow of a series of Yii application when handling user requests.
- User makes a request to the URL http://www.yiicode.com/index.php?r=post/show&id=1 and Web server handles the request by running the bootstrap script index.php.
- Bootstrap script creates an instance application and run it.
- Applications to get detailed information from the user requests an application component named request.
- The application determines the requested controller and action with the help of an application component named urlManager. In this example, the controller is a post that refers to class PostController; and actions show the true meaning is determined by the controller.
- Application creates an instance controller is required to further handle user requests. Show the controller determines that the action refers to a method named actionShow the controller class. Then create and run a filter (eg access control, measurement) associated with this action. The action is executed if allowed by the filter.
- Action to read the Post Model where the ID is 1 from the database.
- Action renders a view named show with the model of the Post.
- View to read and display the attributes of the Post model.
- View running multiple widgets.
No comments:
Post a Comment