Home  >  Article  >  Backend Development  >  Yii PHP framework version 2

Yii PHP framework version 2

WBOY
WBOYOriginal
2016-07-29 09:13:25980browse

Translator of this article: Alexander Gao Please indicate the source when quoting or reprinting.

Yii PHP Framework Version 2 ¶

  1. Installation

This is the core framework code of Yii 2.

This repository is a child of https://github.com/yiisoft/yii2 Project, please submit issue reports and pull requests to the main repository. Please consult the LICENSE document for licensing information.

Installation ¶

It is recommended to install the Yii framework through composer.

Run

composer global require "fxp/composer-asset-plugin:~1.0.0"composer require yiisoft/yii2

or add

"yiisoft/yii2": "~2.0.0",

to the require section of composer.json.

Class Reference

BootstrapBootstrapBootstrapproperty, eventbehaviorController is the base class for classes that contain controller logic. DynamicModel is a model class mainly used for specific data validation. ExceptionExceptionEvent is the base class for all event classes. ExceptionExceptionExceptionExceptionModelEvent represents a parameter required by yiibaseModel events. Module is the base class for modules and application classes. ExceptionExceptionpropertyyiibaseRequestApplicationyiibaseResponseApplicationyiibaseSecurityTheme Represents the theme of the application. ExceptionExceptionApcCache provides APC caching in terms of an ApplicationArrayCache provides caching for the current request only by storing the values ​​in an array.Cache is the base class for cache classes supporting different cache storage implementations.ApplicationyiicachingDependencyyiicachingExpressionDependencyyiicachingFileCacheApplication component based on memcache and memcached.MemCacheServer represents the configuration data for a single memcache or memcached server.TagDependency associates a cached data item with one or multiple $tags. ache caching in terms of an ApplicationZendDataCache provides Zend data caching in terms of an ApplicationyiicaptchaCaptchayiicaptchaCaptchaAction
Class Description
YiiYii is a helper class that serves common framework functions.
yiiBaseYiiBaseYii is the core helper class of Yii framework.
yiibaseActionAction is the base class for all controller action classes.
yiibaseActionEventActionEvent is used to represent the event parameters of an action event.
yiibaseActionFilterActionFilter is the base class of action filters.
yiibaseApplicationApplication is the base class for all application classes.
yiibaseArrayAccessTraitArrayAccessTrait provides implementations for IteratorAggregate, ArrayAccess and Countable.
yiibaseArrayableArrayable is the interface that should be implemented by classes who want to support customizable representation of their instances.
yiibaseBehaviorBehavior is the base class for all behavior classes.
yiibaseInterface
Interface is the interface that should be implemented by classes who want to participate in the Application process.yiibaseComponent Component is the base class that implements the
and features.yiibaseConfigurableConfigurable is the interface that should be implemented by classes who support configuring its properties through the last parameter to its constructor. yiibaseController
yiibaseDynamicModel
yiibaseError
Error represents a PHP error.
yiibaseErrorHandlerErrorHandler handles uncaught PHP errors and exceptions. yiibaseEvent
yiibase
represents a common exception for all problems.
yiibaseExitExceptionExitException represents the normal termination of an application.
yiibaseInlineActionInlineAction represents an action defined as a controller method. yiibaseInvalidCall
InvalidCall represents an exception caused by calling a method in the wrong way.
yiibaseInvalidConfigExceptionInvalidConfigException represents an exception caused by incorrect object configuration.
yiibaseInvalidParamExceptionInvalidParamException represents an exception caused by an invalid function passed into a method.
yiibaseInvalidRouteExceptionInvalidRouteException represents an exception caused by an invalid route. .
yiibaseInvalidValueExceptionInvalidValueException represents an exception caused by a function returning a value of an unexpected type.
yiibaseModelModel is the base class of the data model. yiibaseModelEvent
yiibaseModule
yiibaseNotSupported
NotSupported Represents an exception caused by accessing unsupported functionality.
yiibaseObjectObject is the base class that implements the feature.
Request represents a request object processed by yiibase.
Response represents the response of an yiibase to a yiibaseRequest.
Security provides a set of methods to handle common security-related tasks. yiibaseTheme
yiibaseUnknownClass
UnknownClass represents an exception caused by using an unknown class.
yiibaseUnknownMethodExceptionUnknownMethodException represents an Exception caused by accessing an unknown object method.
yiibaseUnknownPropertyExceptionUn knownPropertyException represents an Exception caused by accessing unknown object properties.
yiibaseUserExceptionUserException is the base class for exceptions that will be displayed to the end user.
yiibaseViewView represents the view object in MVC mode.
yiibaseViewContextInterfaceViewContextInterface is the interface that should be implemented by classes who want to support relative view names.
yiibaseViewEventViewEvent represents an event triggered by the yiibaseView component.
yiibaseViewRendererViewRenderer is the base class of the view rendering class.
yiibaseWidgetWidget is the base class of plugin class.
yiibehaviorsAttributeBehaviorAttributeBehavior automatically assigns a specified value to one or multiple attributes of an ActiveRecord object when certain events happen.
yiibehaviorsBlameableBehaviorBlameableBehavior automatically fills the specified attributes with the current user ID.
yiibehaviorsSluggableBehaviorSluggableBehavior automatically fills the specified attributes with a value that can be used a slug in a URL.
yiibehaviorsTimestampBehaviorTimestampBehavior automatically fills the specified attributes with the current timestamp. ApcCache
component.yiicachingArrayCache
yiicachingCache
chainedDependency represents a dependency which is composed of a list of other dependencies.
yiicachingDbCache implements a cache component by storing cached data in a database.
yiicachingDbDependencyDbDependency represents a dependency based on the query result of a SQL statement.
Dependency is the base class for cache dependency classes. DummyCache is a placeholder cache component.
ExpressionDependency represents a dependency based on the result of a PHP expression.
FileCache implements a cache component using files. FileDependency represents a dependency based on a file's last modification time.
yiicachingMemCacheMemCache implements a cache
yiicachingMemCacheServer
yiicachingTagDependency
component.yiicachingZendDataCache
component.
Captcha displays a verification code image and receives the verification code entered by the user Input box .
CaptchaAction displays a verification code image.
yiicaptchaCaptchaAssetThis asset bundle provides the javascript files needed for the yiicaptchaCaptcha widget.
yiicaptchaCaptchaValidatorCaptchaValidator validates that the attribute value is the same as the verification code displayed in the CAPTCHA.
yiiconsoleApplicationApplication represents a console Application.
yiiconsoleControllerController is the base class of console command classes.
yiiconsoleErrorHandlerErrorHandler handles uncaught PHP errors and Exceptions.
yiiconsoleExceptionException represents an Exception caused by incorrect usage of a console command.
yiiconsoleMarkdownA Markdown parser that enhances markdown for reading in console environments.
yiiconsoleRequestThe console Request represents the environment information for a console Application.
yiiconsoleResponseThe console Response represents the result of a console Application.
yiiconsolecontrollersAssetControllerAllows you to combine and compress your JavaScript and CSS files.
yiiconsolecontrollersBaseMigrateControllerBaseMigrateController is base class for migrate controllers.
yiiconsolecontrollersCacheController允许你来刷新缓存。
yiiconsolecontrollersFixtureControllerManages fixture data loading and unloading.
yiiconsolecontrollersHelpController提供关于控制台命令的错误信息。
yiiconsolecontrollersMessageControllerExtracts messages to be translated from source files.
yiiconsolecontrollersMigrateControllerManages Application migrations.
yiidataActiveDataProviderActiveDataProvider implements a data provider based on yiidbQuery and yiidbActiveQuery.
yiidataArrayDataProviderArrayDataProvider implements a data provider based on a data array.
yiidataBaseDataProviderBaseDataProvider provides a base class that implements the yiidataDataProviderInterface.
yiidataDataProviderInterfaceDataProviderInterface is the interface that must be implemented by data provider classes.
yiidataPaginationPagination represents information relevant to pagination of data items.
yiidataSortSort represents information relevant to sorting.
yiidataSqlDataProviderSqlDataProvider implements a data provider based on a plain SQL statement.
yiidbActiveQueryActiveQuery represents a DB query associated with an Active Record class.
yiidbActiveQueryInterfaceActiveQueryInterface defines the common interface to be implemented by active record query classes.
yiidbActiveQueryTraitActiveQueryTrait implements the common methods and properties for active record query classes.
yiidbActiveRecordActiveRecord is the base class for classes representing relational data in terms of objects.
yiidbActiveRecordInterfaceActiveRecordInterface
yiidbActiveRelationTraitActiveRelationTrait implements the common methods and properties for active record relational queries.
yiidbAfterSaveEventAfterSaveEvent represents the information available in yiidbActiveRecord::EVENT_AFTER_INSERT and yiidbActiveRecord::EVENT_AFTER_UPDATE.
yiidbBaseActiveRecordActiveRecord is the base class for classes representing relational data in terms of objects.
yiidbBatchQueryResultBatchQueryResult represents a batch query from which you can retrieve data in batches.
yiidbColumnSchemaColumnSchema class describes the metadata of a column in a database table.
yiidbColumnSchemaBuilderColumnSchemaBuilder helps to define database schema types using a PHP interface.
yiidbCommandCommand represents a SQL statement to be executed against a database.
yiidbConnectionConnection represents a connection to a database via PDO.
yiidbDataReaderDataReader represents a forward-only stream of rows from a query result set.
yiidbExceptionException represents an Exception that is caused by some DB-related operations.
yiidbExpressionExpression represents a DB expression that does not need escaping or quoting.
yiidbIntegrityExceptionException represents an Exception that is caused by violation of DB constraints.
yiidbMigrationMigration is the base class for representing a database migration.
yiidbMigrationInterfaceThe MigrationInterface defines the minimum set of methods to be implemented by a database migration.
yiidbQueryQuery represents a SELECT SQL statement in a way that is independent of DBMS.
yiidbQueryBuilderQueryBuilder builds a SELECT SQL statement based on the specification given as a yiidbQuery object.
yiidbQueryInterfaceThe QueryInterface defines the minimum set of methods to be implemented by a database query.
yiidbQueryTraitThe BaseQuery trait represents the minimum method set of a database Query.
yiidbSchemaSchema is the base class for concrete DBMS-specific schema classes.
yiidbSchemaBuilderTraitSchemaBuilderTrait contains shortcut methods to create instances of yiidbColumnSchemaBuilder.
yiidbStaleObjectException 
yiidbTableSchemaTableSchema represents the metadata of a database table.
yiidbTransactionTransaction 表示一个数据库事务。
yiidbcubridQueryBuilderQueryBuilder is the query builder for CUBRID databases (version 9.3.x and higher).
yiidbcubridSchemaSchema is the class for retrieving metadata from a CUBRID database (version 9.3.x and higher).
yiidbmssqlPDOThis is an extension of the default PDO class of MSSQL and DBLIB drivers.
yiidbmssqlQueryBuilderQueryBuilder is the query builder for MS SQL Server databases (version 2008 and above).
yiidbmssqlSchemaSchema is the class for retrieving metadata from a MS SQL Server databases (version 2008 and above).
yiidbmssqlSqlsrvPDOThis is an extension of the default PDO class of SQLSRV driver.
yiidbmssqlTableSchemaTableSchema represents the metadata of a database table.
yiidbmysqlQueryBuilderQueryBuilder 是MySQL数据库的查询构建器。
yiidbmysqlSchemaSchema is the class for retrieving metadata from a MySQL database (version 4.1.x and 5.x).
yiidbociColumnSchemaBuilderColumnSchemaBuilder is the schema builder for Oracle databases.
yiidbociQueryBuilderQueryBuilder is the query builder for Oracle databases.
yiidbociSchemaSchema is the class for retrieving metadata from an Oracle database
yiidbpgsqlQueryBuilderQueryBuilder is the query builder for PostgreSQL databases.
yiidbpgsqlSchemaSchema is the class for retrieving metadata from a PostgreSQL database (version 9.x and above).
yiidbsqliteQueryBuilderQueryBuilder is the query builder for SQLite databases.
yiidbsqliteSchemaSchema is the class for retrieving metadata from a SQLite (2/3) database.
yiidiContainerContainer implements a dependency injection container.
yiidiInstanceInstance represents a reference to a named object in a dependency injection (DI) container or a service locator.
yiidiServiceLocatorServiceLocator 实现了一个服务定位器。
yii\filters\AccessControlAccessControl provides simple access control based on a set of rules.
yii\filters\AccessRuleThis class represents an access rule defined by the yii\filters\AccessControl action filter
yii\filters\ContentNegotiatorContentNegotiator supports response format negotiation and Application language negotiation.
yii\filters\CorsCors filter implements Cross Origin Resource Sharing.
yii\filters\HttpCacheHttpCache implements client-side caching by utilizing the Last-Modified and Etag HTTP headers.
yii\filters\PageCachePageCache implements server-side caching of whole pages.
yii\filters\RateLimitInterfaceRateLimitInterface is the interface that may be implemented by an identity object to enforce rate limiting.
yii\filters\RateLimiterRateLimiter implements a rate limiting algorithm based on the leaky bucket algorithm.
yii\filters\VerbFilterVerbFilter is an action filter that filters by HTTP request methods.
yii\filters\auth\AuthInterfaceAuthInterface is the interface that should be implemented by auth method classes.
yii\filters\auth\AuthMethodAuthMethod is a base class implementing the yii\filters\auth\AuthInterface interface.
yii\filters\auth\CompositeAuthCompositeAuth is an action filter that supports multiple authentication methods at the same time.
yii\filters\auth\HttpBasicAuthHttpBasicAuth is an action filter that supports the HTTP Basic authentication method.
yii\filters\auth\HttpBearerAuthHttpBearerAuth is an action filter that supports the authentication method based on HTTP Bearer token.
yii\filters\auth\QueryParamAuthQueryParamAuth is an action filter that supports the authentication based on the access token passed through a query parameter.
yii\grid\ActionColumnActionColumn is a column for the yii\grid\GridView widget that displays buttons for viewing and manipulating the items.
yii\grid\CheckboxColumnCheckboxColumn displays a column of checkboxes in a grid view.
yii\grid\ColumnColumn is the base class of all yii\grid\GridView column classes.
yii\grid\DataColumnDataColumn is the default column type for the yii\grid\GridView widget.
yii\grid\GridViewThe GridView widget is used to display data in a grid.
yii\grid\GridViewAssetThis asset bundle provides the javascript files for the yii\grid\GridView widget.
yii\grid\SerialColumnSerialColumn displays a column of row numbers (1-based).
yii\helpers\ArrayHelperArrayHelper provides additional array functionality that you can use in your Application.
yiihelpersBaseArrayHelperBaseArrayHelper provides concrete implementation for yiihelpersArrayHelper.
yiihelpersBaseConsoleBaseConsole provides concrete implementation for yiihelpersConsole.
yiihelpersBaseFileHelperBaseFileHelper provides concrete implementation for yiihelpersFileHelper.
yiihelpersBaseFormatConverterBaseFormatConverter provides concrete implementation for yiihelpersFormatConverter.
yiihelpersBaseHtmlBaseHtml provides concrete implementation for yiihelpersHtml.
yiihelpersBaseHtmlPurifierBaseHtmlPurifier provides concrete implementation for yiihelpersHtmlPurifier.
yiihelpersBaseInflectorBaseInflector provides concrete implementation for yiihelpersInflector.
yiihelpersBaseJsonBaseJson provides concrete implementation for yiihelpersJson.
yiihelpersBaseMarkdownBaseMarkdown provides concrete implementation for yiihelpersMarkdown.
yiihelpersBaseStringHelperBaseStringHelper provides concrete implementation for yiihelpersStringHelper.
yiihelpersBaseUrlBaseUrl provides concrete implementation for yiihelpersUrl.
yiihelpersBaseVarDumperBaseVarDumper provides concrete implementation for yiihelpersVarDumper.
yiihelpersConsoleConsole helper provides useful methods for command line related tasks such as getting input or formatting and coloring output.
yiihelpersFileHelperFile system helper
yiihelpersFormatConverterFormatConverter provides functionality to convert between different formatting pattern formats.
yiihelpersHtmlHtml provides a set of static methods for generating commonly used HTML tags.
yiihelpersHtmlPurifierHtmlPurifier provides an ability to clean up HTML from any harmful code.
yiihelpersInflectorInflector pluralizes and singularizes English nouns. It also contains some other useful methods.
yiihelpersJsonJson is a helper class providing JSON data encoding and decoding.
yiihelpersMarkdownMarkdown provides an ability to transform markdown into HTML.
yiihelpersStringHelperStringHelper
yiihelpersUrlUrl provides a set of static methods for managing URLs.
yiihelpersVarDumperVarDumper is intended to replace the buggy PHP function var_dump and print_r.
yiii18nDbMessageSourceDbMessageSource extends yiii18nMessageSource and represents a message source that stores translated messages in database.
yiii18nFormatterFormatter provides a set of commonly used data formatting methods.
yiii18nGettextFileGettextFile is the base class for representing a Gettext message file.
yiii18nGettextMessageSourceGettextMessageSource represents a message source that is based on GNU Gettext.
yiii18nGettextMoFileGettextMoFile represents an MO Gettext message file.
yiii18nGettextPoFileGettextPoFile represents a PO Gettext message file.
yiii18nI18NI18N provides features related with internationalization (I18N) and localization (L10N).
yiii18nMessageFormatterMessageFormatter allows formatting messages via ICU message format
yiii18nMessageSourceMessageSource is the base class for message translation repository classes.
yiii18nMissingTranslationEventMissingTranslationEvent represents the parameter for the yiii18nMessageSource::EVENT_MISSING_TRANSLATION event.
yiii18nPhpMessageSourcePhpMessageSource represents a message source that stores translated messages in PHP scripts.
yiilogDbTargetDbTarget stores log messages in a database table.
yiilogDispatcherDispatcher manages a set of log targets.
yiilogEmailTargetEmailTarget sends selected log messages to the specified email addresses.
yiilogFileTargetFileTarget records log messages in a file.
yiilogLoggerLogger records logged messages in memory and sends them to different targets if $dispatcher is set.
yiilogSyslogTargetSyslogTarget writes log to syslog.
yiilogTargetTarget is the base class for all log target classes.
yii\mail\BaseMailerBaseMailer serves as a base class that implements the basic functions required by yii\mail\MailerInterface.
yii\mail\BaseMessageBaseMessage serves as a base class that implements the send() method required by yiimailMessageInterface.
yiimailMailEventMailEvent represents the event parameter used for events triggered by yiimailBaseMailer.
yiimailMailerInterfaceMailerInterface is the interface that should be implemented by mailer classes.
yiimailMessageInterfaceMessageInterface is the interface that should be implemented by mail message classes.
yiimutexDbMutexDbMutex is the base class for classes, which relies on database while implementing mutex "lock" mechanism.
yiimutexFileMutexFileMutex implements mutex "lock" mechanism via local file system files.
yiimutexMutexMutex component allows mutual execution of the concurrent processes, preventing "race conditions".
yiimutexMysqlMutexMysqlMutex implements mutex "lock" mechanism via MySQL locks.
yiirbacAssignmentAssignment represents an assignment of a role to a user.
yiirbacBaseManagerBaseManager is a base class implementing yiirbacManagerInterface for RBAC management.
yiirbacDbManagerDbManager represents an authorization manager that stores authorization information in database.
yiirbacItem 
yiirbacManagerInterface 
yiirbacPermission 
yiirbacPhpManagerPhpManager represents an authorization manager that stores authorization information in terms of a PHP script file.
yiirbacRole 
yiirbacRuleRule represents a business constraint that may be associated with a role, permission or assignment.
yiirestActionAction is the base class for action classes that implement RESTful API.
yiirestActiveControllerActiveController implements a common set of actions for supporting RESTful access to ActiveRecord.
yiirestControllerController is the base class for RESTful API controller classes.
yiirestCreateActionCreateAction implements the API endpoint for creating a new model from the given data.
yiirestDeleteActionDeleteAction implements the API endpoint for deleting a model.
yiirestIndexAction 
yiirestOptionsActionOptionsAction responds to the OPTIONS request by sending back an Allow header.
yiirestSerializerSerializer converts resource objects and collections into array representation.
yiirestUpdateActionUpdateAction implements the API endpoint for updating a model.
yiirestUrlRuleUrlRule is provided to simplify the creation of URL rules for RESTful API support.
yiirestViewActionViewAction implements the API endpoint for returning the detailed information about a model.
yiitestActiveFixtureActiveFixture represents a fixture backed up by a ActiveRecord class or a database table.
yiitestArrayFixtureArrayFixture represents arbitrary fixture that can be loaded from PHP files.
yiitestBaseActiveFixtureBaseActiveFixture is the base class for fixture classes that support accessing fixture data as ActiveRecord objects.
yiitestDbFixtureDbFixture is the base class for DB-related fixtures.
yiitestFixtureFixture represents a fixed state of a test environment.
yiitestFixtureTraitFixtureTrait provides functionalities for loading, unloading and accessing fixtures for a test case.
yiitestInitDbFixtureInitDbFixture represents the initial state needed for DB-related tests.
yiivalidatorsBooleanValidatorBooleanValidator checks if the attribute value is a boolean value.
yiivalidatorsCompareValidatorCompareValidator compares the specified attribute value with another value.
yiivalidatorsDateValidatorDateValidator verifies if the attribute represents a date, time or datetime in a proper $format.
yiivalidatorsDefaultValueValidatorDefaultValueValidator sets the attribute to be the specified default value.
yiivalidatorsEachValidatorEachValidator validates an array by checking each of its elements against an embedded validation rule.
yiivalidatorsEmailValidatorEmailValidator validates that the attribute value is a valid email address.
yiivalidatorsExistValidatorExistValidator validates that the attribute value exists in a table.
yiivalidatorsFileValidatorFileValidator verifies if an attribute is receiving a valid uploaded file.
yiivalidatorsFilterValidatorFilterValidator converts the attribute value according to a filter.
yiivalidatorsImageValidatorImageValidator verifies if an attribute is receiving a valid image.
yiivalidatorsInlineValidatorInlineValidator represents a validator which is defined as a method in the object being validated.
yiivalidatorsNumberValidatorNumberValidator validates that the attribute value is a number.
yiivalidatorsPunycodeAssetThis asset bundle provides the javascript files needed for the yiivalidatorsEmailValidators client validation.
yiivalidatorsRangeValidatorRangeValidator validates that the attribute value is among a list of values.
yiivalidatorsRegularExpressionValidatorRegularExpressionValidator validates that the attribute value matches the specified $pattern.
yiivalidatorsrequiredValidatorrequiredValidator 验证指定属性不是空或null。
yiivalidatorsSafeValidatorSafeValidator serves as a dummy validator whose main purpose is to mark the attributes to be safe for massive assignment.
yiivalidatorsStringValidatorStringValidator 验证属性值符合一定长度。
yiivalidatorsUniqueValidatorUniqueValidator 验证属性值在指定数据库表中是唯一的。
yiivalidatorsUrlValidatorUrlValidator 验证属性值是否为有效的http或https URL。
yiivalidatorsValidationAsset此资源包提供了客户端验证所需的js文件。
yiivalidatorsValidatorValidator 是所有验证器类的基类。
yiiwebApplicationApplication是所有web应用程序类的基类。
yiiwebAssetBundleAssetBundle 表示一组资源文件的集合, 如 CSS, JS, images.
yiiwebAssetConverterAssetConverter supports conversion of several popular script formats into JS or CSS scripts.
yiiwebAssetConverterInterfaceThe AssetConverterInterface must be implemented by asset converter classes.
yiiwebAssetManagerAssetManager manages asset bundle configuration and loading.
yiiwebBadRequestHttpExceptionBadRequestHttpException represents a "Bad Request" HTTP Exception with status code 400.
yiiwebCacheSessionCacheSession implements a Session component using cache as storage medium.
yiiwebCompositeUrlRuleCompositeUrlRule is the base class for URL rule classes that consist of multiple simpler rules.
yiiwebConflictHttpExceptionConflictHttpException represents a "Conflict" HTTP Exception with status code 409
yiiwebControllerController is the base class of web controllers.
yiiwebCookieCookie 表示一个cookie关联的信息,如 $name, $value, $domain, 等等.
yiiwebCookieCollectionCookieCollection 保持当前请求中的cookies可用。
yiiwebDbSessionDbSession extends yiiwebSession by using database as Session data storage.
yiiwebErrorActionErrorAction 使用指定视图显示应用程序错误。
yiiwebErrorHandlerErrorHandler 处理未捕获的错误和异常。
yii\web\ForbiddenHttpExceptionForbiddenHttpException represents a "Forbidden" HTTP Exception with status code 403.
yii\web\GoneHttpExceptionGoneHttpException represents a "Gone" HTTP Exception with status code 410
yii\web\GroupUrlRuleGroupUrlRule represents a collection of URL rules sharing the same prefix in their patterns and routes.
yii\web\HeaderCollectionHeaderCollection is used by yii\web\Response to maintain the currently registered HTTP headers.
yii\web\HtmlResponseFormatterHtmlResponseFormatter formats the given data into an HTML response content.
yii\web\HttpExceptionHttpException represents an Exception caused by an improper request of the end-user.
yii\web\IdentityInterfaceIdentityInterface is the interface that should be implemented by a class providing identity information.
yii\web\JqueryAssetThis asset bundle provides the jquery javascript library
yii\web\JsExpressionJsExpression marks a string as a JavaScript expression.
yii\web\JSONParserParses a raw HTTP request using yii\helpers\Json::decode()
yii\web\JsonResponseFormatterJsonResponseFormatter formats the given data into a JSON or JSONP response content.
yii\web\LinkLink represents a link object as defined in JSON Hypermedia API Language.
yii\web\LinkableLinkable is the interface that should be implemented by classes that typically represent locatable resources.
yii\web\MethodNotAllowedHttpExceptionMethodNotAllowedHttpException represents a "Method Not Allowed" HTTP Exception with status code 405.
yii\web\MultiFieldSessionMultiFieldSession is the base class for Session storage implementations with multi-field data storage support.
yii\web\NotAcceptableHttpExceptionNotAcceptableHttpException represents a "Not Acceptable" HTTP Exception with status code 406
yii\web\NotFoundHttpExceptionNotFoundHttpException represents a "Not Found" HTTP Exception with status code 404.
yii\web\RequestThe web Request class represents an HTTP request
yii\web\RequestParserInterfaceInterface for classes that parse the raw request body into a parameters array.
yii\web\ResponseThe web Response class represents an HTTP response
yii\web\ResponseFormatterInterfaceResponseFormatterInterface specifies the interface needed to format a response before it is sent out.
yii\web\ServerErrorHttpExceptionServerErrorHttpException represents an "Internal Server Error" HTTP Exception with status code 500.
yii\web\SessionSession provides Session data management and the related configurations.
yii\web\SessionIteratorSessionIterator implements an Iterator for traversing Session variables managed by yii\web\Session.
yii\web\TooManyRequestsHttpExceptionTooManyRequestsHttpException represents a "Too Many Requests" HTTP Exception with status code 429
yii\web\UnauthorizedHttpExceptionUnauthorizedHttpException represents an "Unauthorized" HTTP Exception with status code 401
yii\web\UnprocessableEntityHttpExceptionUnprocessableEntityHttpException represents an "Unprocessable Entity" HTTP Exception with status code 422.
yii\web\UnsupportedMediaTypeHttpExceptionUnsupportedMediaTypeHttpException represents an "Unsupported Media Type" HTTP Exceptionwith status code 415
yiiwebUploadedFileUploadedFile represents the information for an uploaded file.
yiiwebUrlManagerUrlManager handles HTTP request parsing and creation of URLs based on a set of rules.
yiiwebUrlRuleUrlRule represents a rule used by yiiwebUrlManager for parsing and generating URLs.
yiiwebUrlRuleInterfaceUrlRuleInterface is the interface that should be implemented URL rule classes.
yiiwebUserUser is the class for the "user" Application component that manages the user authentication status.
yiiwebUserEventThis event class is used for Events triggered by the yiiwebUser class.
yiiwebViewView represents a view object in the MVC pattern.
yiiwebViewActionViewAction represents an action that displays a view according to a user-specified parameter.
yiiwebXmlResponseFormatterXmlResponseFormatter formats the given data into an XML response content.
yiiwebYiiAssetThis asset bundle provides the base javascript files for the Yii Framework.
yiiwidgetsActiveFieldActiveField represents a form input field within an yiiwidgetsActiveForm.
yiiwidgetsActiveFormActiveForm is a widget that builds an interactive HTML form for one or multiple data models.
yiiwidgetsActiveFormAsset 
yiiwidgetsBaseListViewBaseListView is a base class for widgets displaying data from data provider such as ListView and GridView.
yiiwidgetsBlockBlock records all output between begin() and end() calls and stores it in yiibaseView::$blocks.
yiiwidgetsBreadcrumbsBreadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.
yiiwidgetsContentDecoratorContentDecorator records all output between begin() and end() calls, passes it to the given view file as $content and then echoes rendering result.
yiiwidgetsDetailViewDetailView displays the detail of a single data $model.
yiiwidgetsFragmentCacheFragmentCache is used by yiibaseView to provide caching of page fragments.
yiiwidgetsInputWidgetInputWidget is the base class for widgets that collect user inputs.
yiiwidgetsLinkPagerLinkPager displays a list of hyperlinks that lead to different pages of target.
yiiwidgetsLinkSorterLinkSorter renders a list of sort links for the given sort definition.
yiiwidgetsListViewThe ListView widget is used to display data from data provider. Each data model is rendered using the view specified.
yiiwidgetsMaskedInputMaskedInput generates a masked text input.
yiiwidgetsMaskedInputAssetThe asset bundle for the yiiwidgetsMaskedInput widget.
yiiwidgetsMenuMenu displays a multi-level menu using nested HTML lists.
yiiwidgetsPjaxPjax is a widget integrating the pjax jQuery plugin.
yiiwidgetsPjaxAssetThis asset bundle provides the javascript files required by yiiwidgetsPjax widget.
yiiwidgetsSpacelessSpaceless widget removes whitespace characters between HTML tags. Whitespaces within HTML tags or in a plain text are always left untouched.

以上就介绍了Yii PHP框架 版本2,包括了require,Exception,Bootstrap,JSONP,PHP框架方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Statement:
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