Home > PHP Framework > YII > The operating mechanism of the yii framework

The operating mechanism of the yii framework

(*-*)浩
Release: 2020-01-14 16:08:16
Original
2584 people have browsed it

The operating mechanism of the yii framework

Every time the Yii application starts processing an HTTP request, it will go through an approximate process. (Recommended learning: yii tutorial )

user submit a request to the inlet script web/index.php.

The entry script will load the configuration array and create an application instance to handle the request.

The application will resolve the requested route through the request application component.

The application creates a controller instance to specifically handle the request.

The controller will create an action instance and execute the relevant Filters (access filters) for the action.

If any filter fails to verify, the action will be cancelled.

If all filters pass, this action will be executed.

The action will load a data model, usually from the database.

The action renders a View and provides it with the required data model.

The rendered result will be returned to the response (response) application component.

The response component will send the rendering result back to the user's browser.

The diagram below shows how the application handles a request.

The operating mechanism of the yii framework

The above is the detailed content of The operating mechanism of the yii framework. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template