Skip to content

A ​

action ​

Action is a callable, class, or class method that handles a matched route and returns a response. Read more in "Actions".

alias ​

别名是 Yii 用于引用类或目录的字符串,例如 @app/vendor。详见“别名”。

application ​

Application is an object that starts up, handles a request through configured middleware, and shuts down. Read more in "Application".

asset ​

资源是指资源文件。通常包含 JavaScript 或 CSS 代码,但也可以是任何通过 HTTP 访问的静态内容。详见“资源”。

asset bundle ​

Asset bundle is a PHP class that declares a group of CSS, JavaScript, image, or font files that should be published and registered together. Read more in "Asset Bundles".

authentication ​

Authentication is the process of determining the identity of the current user. Read more in "Authentication".

authorization ​

Authorization is the process of checking whether an authenticated or anonymous user is allowed to perform an action. Read more in "Authorization".

autoloading ​

Autoloading is the process of loading PHP classes automatically when they are first used. Read more in "Class autoloading".

B ​

bootstrap ​

Bootstrap is application startup code that prepares services, configuration, and runtime state before request handling. Read more in "Configuration".

C ​

configuration ​

Configuration may refer either to the process of setting properties of an object or to a configuration file that stores settings for an object, or a class of objects. Read more in "Configuration".

container ​

Container is an object that creates services, resolves their dependencies, and returns configured instances. Read more in "DI container".

controller ​

Controller is a class that groups action methods for related routes. Read more in "Actions".

Cookie is a small piece of data stored by a browser and sent with later requests to the same site. Read more in "Cookies".

CSRF ​

CSRF means cross-site request forgery, an attack where another site tries to make a user's browser submit an unwanted request to your application. Read more in "Avoiding CSRF".

D ​

DI ​

Dependency injection is a programming technique where an object receives its dependencies from the outside. Read more in "Dependency injection and container".

E ​

entry script ​

Entry script is the first PHP script executed for a web or console application. Read more in "Entry scripts".

event ​

Event is an object that represents something that happened and can be passed to listeners. Read more in "Events".

H ​

handler ​

Handler is callable code selected by routing or middleware to process a request and produce a response. Read more in "Routing and URL generation".

I ​

installation ​

安装是按照 readme 文件或执行专门准备的脚本来使软件正常运行的过程。对于 Yii 而言,主要是设置权限和满足软件依赖要求。

L ​

layout ​

Layout is a view template that wraps page-specific content with shared page structure. Read more in "Working with layouts".

M ​

migration ​

Migration is a versioned PHP class that applies or reverts a database schema or data change. Read more in "Migrations".

middleware ​

中间件是请求处理栈中的一个处理器。对于给定的请求,它既可以直接生成响应,也可以执行某些操作后将处理传递给下一个中间件。详见“中间件”。

model ​

Model is an object that represents application data and usually contains validation or business rules for that data. Read more in "Working with forms".

module ​

模块是根据使用场景对代码进行分组的命名空间。它通常在主应用程序中使用,可以包含任意源代码、定义额外的 URL 处理器或控制台命令。

N ​

namespace ​

命名空间是指一种 PHP 语言特性,用于将多个类归组到某个特定名称下。

P ​

package ​

A package usually refers to Composer package. It's code ready for reuse and redistribution installable automatically via a package manager.

parameter ​

Parameter is a configuration value that can be used by application or package config files. Read more in "Parameters".

Q ​

queue ​

A queue is a data structure that processes items in first-in, first-out order. Yii has a yiisoft/queue package.

R ​

request ​

Request is a PSR-7 object that represents an incoming HTTP message, including method, URI, headers, body, uploaded files, and attributes. Read more in "Request".

response ​

Response is a PSR-7 object that represents an outgoing HTTP message, including status code, headers, and body. Read more in "Response".

route ​

Route describes which request method and URL pattern should be handled by which action or middleware. Read more in "Routing and URL generation".

rule ​

规则通常指 yiisoft/validator 包的验证规则。它持有一组用于检查数据集是否有效的参数。“规则处理器”负责实际执行处理。

S ​

service ​

Service is a focused object that performs application work or provides infrastructure behavior and is usually stored in the DI container. Read more in "Service components".

service provider ​

Service provider is a class that registers related service definitions for the DI container. Read more in "Service providers".

session ​

Session is server-side storage associated with a browser across multiple requests. Read more in "Sessions".

T ​

template ​

Template is a file used by a view or template engine to produce presentation output such as HTML. Read more in "Views".

V ​

vendor ​

A vendor is an organization or individual developer providing code in the form of packages. It also may refer to Composer's vendor directory.

view ​

View is responsible for presenting data to end users, usually by executing a template with provided data. Read more in "Views".

W ​

widget ​

Widget is a reusable view component that renders a piece of user interface. Read more in "Widgets".