Interface yii\base\StaticInstanceInterface
Implemented by | yii\base\DynamicModel, yii\base\Model, yii\data\ActiveDataFilter, yii\data\DataFilter, yii\db\ActiveRecord, yii\db\ActiveRecordInterface, yii\db\BaseActiveRecord |
---|---|
Available since version | 2.0.13 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/base/StaticInstanceInterface.php |
StaticInstanceInterface is the interface for providing static instances to classes, which can be used to obtain class meta information that can not be expressed in static methods.
For example: adjustments made by DI or behaviors reveal only at object level, but might be needed at class (static) level as well.
To implement the instance() method you may use yii\base\StaticInstanceTrait.
See also yii\base\StaticInstanceTrait.
Public Methods
Method | Description | Defined By |
---|---|---|
instance() | Returns static class instance, which can be used to obtain meta information. | yii\base\StaticInstanceInterface |
Signup or Login in order to comment.