Home >PHP Framework >YII >What are the core components of yii
yii components include: 1. "AssetManager", which represents the management of resource packages and resource publishing; 2. "Connection", which represents a database connection that can perform database operations; 3. "Application::errorHandler", used For handling PHP errors and exceptions, etc.
yii framework core component functions
yii\web\AssetManager: Management of resource packages and resource release
yii\db\Connection: Represents a database connection that can perform database operations. Note that when configuring this component, you must specify the component class name and other related component attributes, such as yii\db\Connection::dsn.
yii\base\Application::errorHandler: Handle PHP errors and exceptions
yii\i18n\Formatter: Format the output data displayed to the end user, for example, numbers may have delimiters, Date uses long format
yii\i18n\I18N: supports information translation and formatting.
yii\log\Dispatcher: Manage log objects.
yii\swiftmailer\Mailer: Supports generating email structure and sending
yii\base\Application::response: Represents the response sent to the user
yii\base\Application ::request: Represents the request received from the end user
yii\web\Session: Represents the session information, only available in yii\web\Application web application
yii\web\ UrlManager: supports URL address parsing and creation
yii\web\User: represents authentication login user information, only available in yii\web\Application web application
yii\web\View: supported Rendering view
Recommended: "yii tutorial"
The above is the detailed content of What are the core components of yii. For more information, please follow other related articles on the PHP Chinese website!