Home > php教程 > PHP开发 > Yii2.0 structure overview

Yii2.0 structure overview

伊谢尔伦
Release: 2016-11-25 14:24:55
Original
1106 people have browsed it

Yii is organized using the Model-View-Controller (MVC) design pattern. The model represents data, business logic, and rules; the view displays the model's output; and the controller accepts inputs and converts them into model and view commands.

In addition to MVC, Yii applications also have the following parts:

Entry script: a PHP script that can be directly accessed by end users and is responsible for starting a request processing cycle.

Application: an object that can be accessed globally, manages and coordinates components to complete requests.

Application component: an object registered in the application, providing different functions to complete requests.

Module: an independent package containing a complete MVC structure. An application can be composed of multiple modules.

Filter: The code that the controller needs to trigger execution before or after processing the request.

Widget: An object that can be embedded in a view, can contain controller logic, and can be called repeatedly by different views.

The diagram below shows the static structure of a Yii application:

Yii2.0 structure overview

Related labels:
yii
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template