1 关注者

接口 yii\base\Configurable

实现yii\base\Action, yii\base\ActionEvent, yii\base\ActionFilter, yii\base\Application, yii\base\BaseObject, yii\base\Behavior, yii\base\Component, yii\base\Controller, yii\base\DynamicModel, yii\base\ErrorHandler, yii\base\Event, yii\base\InlineAction, yii\base\Model, yii\base\ModelEvent, yii\base\Module, yii\base\Object, yii\base\Request, yii\base\Response, yii\base\Security, yii\base\Theme, yii\base\View, yii\base\ViewEvent, yii\base\ViewRenderer, yii\base\Widget, yii\base\WidgetEvent, yii\behaviors\AttributeBehavior, yii\behaviors\AttributeTypecastBehavior, yii\behaviors\AttributesBehavior, yii\behaviors\BlameableBehavior, yii\behaviors\CacheableWidgetBehavior, yii\behaviors\OptimisticLockBehavior, yii\behaviors\SluggableBehavior, yii\behaviors\TimestampBehavior, yii\caching\ApcCache, yii\caching\ArrayCache, yii\caching\Cache, yii\caching\ChainedDependency, yii\caching\DbCache, yii\caching\DbDependency, yii\caching\DbQueryDependency, yii\caching\Dependency, yii\caching\DummyCache, yii\caching\ExpressionDependency, yii\caching\FileCache, yii\caching\FileDependency, yii\caching\MemCache, yii\caching\MemCacheServer, yii\caching\TagDependency, yii\caching\WinCache, yii\caching\XCache, yii\caching\ZendDataCache, yii\captcha\Captcha, yii\captcha\CaptchaAction, yii\captcha\CaptchaAsset, yii\captcha\CaptchaValidator, yii\console\Application, yii\console\Controller, yii\console\ErrorHandler, yii\console\Request, yii\console\Response, yii\console\controllers\AssetController, yii\console\controllers\BaseMigrateController, yii\console\controllers\CacheController, yii\console\controllers\FixtureController, yii\console\controllers\HelpController, yii\console\controllers\MessageController, yii\console\controllers\MigrateController, yii\console\controllers\ServeController, yii\console\widgets\Table, yii\data\ActiveDataFilter, yii\data\ActiveDataProvider, yii\data\ArrayDataProvider, yii\data\BaseDataProvider, yii\data\DataFilter, yii\data\Pagination, yii\data\Sort, yii\data\SqlDataProvider, yii\db\ActiveQuery, yii\db\ActiveRecord, yii\db\AfterSaveEvent, yii\db\BaseActiveRecord, yii\db\BatchQueryResult, yii\db\CheckConstraint, yii\db\ColumnSchema, yii\db\ColumnSchemaBuilder, yii\db\Command, yii\db\Connection, yii\db\Constraint, yii\db\DataReader, yii\db\DefaultValueConstraint, yii\db\Expression, yii\db\ForeignKeyConstraint, yii\db\IndexConstraint, yii\db\Migration, yii\db\Query, yii\db\QueryBuilder, yii\db\Schema, yii\db\SqlToken, yii\db\SqlTokenizer, yii\db\TableSchema, yii\db\Transaction, yii\db\cubrid\ColumnSchemaBuilder, yii\db\cubrid\QueryBuilder, yii\db\cubrid\Schema, yii\db\mssql\ColumnSchema, yii\db\mssql\ColumnSchemaBuilder, yii\db\mssql\QueryBuilder, yii\db\mssql\Schema, yii\db\mssql\TableSchema, yii\db\mysql\ColumnSchema, yii\db\mysql\ColumnSchemaBuilder, yii\db\mysql\QueryBuilder, yii\db\mysql\Schema, yii\db\oci\ColumnSchemaBuilder, yii\db\oci\Command, yii\db\oci\QueryBuilder, yii\db\oci\Schema, yii\db\pgsql\ColumnSchema, yii\db\pgsql\QueryBuilder, yii\db\pgsql\Schema, yii\db\sqlite\ColumnSchemaBuilder, yii\db\sqlite\Command, yii\db\sqlite\QueryBuilder, yii\db\sqlite\Schema, yii\db\sqlite\SqlTokenizer, yii\di\Container, yii\di\ServiceLocator, yii\filters\AccessControl, yii\filters\AccessRule, yii\filters\AjaxFilter, yii\filters\ContentNegotiator, yii\filters\Cors, yii\filters\HostControl, yii\filters\HttpCache, yii\filters\PageCache, yii\filters\RateLimiter, yii\filters\VerbFilter, yii\filters\auth\AuthMethod, yii\filters\auth\CompositeAuth, yii\filters\auth\HttpBasicAuth, yii\filters\auth\HttpBearerAuth, yii\filters\auth\HttpHeaderAuth, yii\filters\auth\QueryParamAuth, yii\grid\ActionColumn, yii\grid\CheckboxColumn, yii\grid\Column, yii\grid\DataColumn, yii\grid\GridView, yii\grid\GridViewAsset, yii\grid\RadioButtonColumn, yii\grid\SerialColumn, yii\i18n\DbMessageSource, yii\i18n\Formatter, yii\i18n\GettextFile, yii\i18n\GettextMessageSource, yii\i18n\GettextMoFile, yii\i18n\GettextPoFile, yii\i18n\I18N, yii\i18n\Locale, yii\i18n\MessageFormatter, yii\i18n\MessageSource, yii\i18n\MissingTranslationEvent, yii\i18n\PhpMessageSource, yii\log\DbTarget, yii\log\Dispatcher, yii\log\EmailTarget, yii\log\FileTarget, yii\log\Logger, yii\log\SyslogTarget, yii\log\Target, yii\mail\BaseMailer, yii\mail\BaseMessage, yii\mail\MailEvent, yii\mutex\DbMutex, yii\mutex\FileMutex, yii\mutex\Mutex, yii\mutex\MysqlMutex, yii\mutex\OracleMutex, yii\mutex\PgsqlMutex, yii\rbac\Assignment, yii\rbac\BaseManager, yii\rbac\DbManager, yii\rbac\Item, yii\rbac\Permission, yii\rbac\PhpManager, yii\rbac\Role, yii\rbac\Rule, yii\rest\Action, yii\rest\ActiveController, yii\rest\Controller, yii\rest\CreateAction, yii\rest\DeleteAction, yii\rest\IndexAction, yii\rest\OptionsAction, yii\rest\Serializer, yii\rest\UpdateAction, yii\rest\UrlRule, yii\rest\ViewAction, yii\test\ActiveFixture, yii\test\ArrayFixture, yii\test\BaseActiveFixture, yii\test\DbFixture, yii\test\Fixture, yii\test\InitDbFixture, yii\validators\BooleanValidator, yii\validators\CompareValidator, yii\validators\DateValidator, yii\validators\DefaultValueValidator, yii\validators\EachValidator, yii\validators\EmailValidator, yii\validators\ExistValidator, yii\validators\FileValidator, yii\validators\FilterValidator, yii\validators\ImageValidator, yii\validators\InlineValidator, yii\validators\IpValidator, yii\validators\NumberValidator, yii\validators\PunycodeAsset, yii\validators\RangeValidator, yii\validators\RegularExpressionValidator, yii\validators\RequiredValidator, yii\validators\SafeValidator, yii\validators\StringValidator, yii\validators\TrimValidator, yii\validators\UniqueValidator, yii\validators\UrlValidator, yii\validators\ValidationAsset, yii\validators\Validator, yii\web\Application, yii\web\AssetBundle, yii\web\AssetConverter, yii\web\AssetManager, yii\web\CacheSession, yii\web\CompositeUrlRule, yii\web\Controller, yii\web\Cookie, yii\web\CookieCollection, yii\web\DbSession, yii\web\ErrorAction, yii\web\ErrorHandler, yii\web\GroupUrlRule, yii\web\HeaderCollection, yii\web\HtmlResponseFormatter, yii\web\JqueryAsset, yii\web\JsExpression, yii\web\JsonResponseFormatter, yii\web\Link, yii\web\MultiFieldSession, yii\web\MultipartFormDataParser, yii\web\Request, yii\web\Response, yii\web\Session, yii\web\UploadedFile, yii\web\UrlManager, yii\web\UrlNormalizer, yii\web\UrlRule, yii\web\User, yii\web\UserEvent, yii\web\View, yii\web\ViewAction, yii\web\XmlResponseFormatter, yii\web\YiiAsset, yii\widgets\ActiveField, yii\widgets\ActiveForm, yii\widgets\ActiveFormAsset, yii\widgets\BaseListView, yii\widgets\Block, yii\widgets\Breadcrumbs, yii\widgets\ContentDecorator, yii\widgets\DetailView, yii\widgets\FragmentCache, yii\widgets\InputWidget, yii\widgets\LinkPager, yii\widgets\LinkSorter, yii\widgets\ListView, yii\widgets\MaskedInput, yii\widgets\MaskedInputAsset, yii\widgets\Menu, yii\widgets\Pjax, yii\widgets\PjaxAsset, yii\widgets\Spaceless
可用版本2.0.3
源代码 https://github.com/yiisoft/yii2/blob/master/framework/base/Configurable.php

Configurable 是一个接口,应该由支持通过其构造函数的最后一个参数配置其属性的类实现。

该接口没有声明任何方法。实现此接口的类必须声明其构造函数,如下所示

public function __construct($param1, $param2, ..., $config = [])

也就是说,构造函数的最后一个参数必须接受一个配置数组。

此接口主要由 yii\di\Container 使用,以便它可以将对象配置作为最后一个参数传递给实现类构造函数。

有关 Configurable 的更多详细信息和使用信息,请参阅有关配置的 指南文章