File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -650,6 +650,16 @@ Customer::deleteAll(['status' => Customer::STATUS_INACTIVE]);
650
650
> - [[ yii\db\ActiveRecord::updateCounters()]]
651
651
> - [[ yii\db\ActiveRecord::updateAllCounters()]]
652
652
653
+ > Note: パフォーマンスを考慮して、DI(依存注入) はデフォルトではサポートされていません。必要であれば、
654
+ > [[ Yii::createObject()]] によってクラスのインスタンス生成をするように [[ yii\db\ActiveRecord::instantiate()|instantiate()]] メソッドをオーバーライドして、サポートを追加することが出来ます。
655
+ >
656
+ > ``` php
657
+ > public static function instantiate($row)
658
+ > {
659
+ > return Yii::createObject(static::class);
660
+ > }
661
+ > ```
662
+
653
663
### データをリフレッシュする際のライフサイクル <span id =" refreshing-data-life-cycle" ></span >
654
664
655
665
[[yii\db\ActiveRecord::refresh()|refresh()]] を呼んでアクティブ・レコード・インスタンスをリフレッシュする際は、リフレッシュが成功してメソッドが `true` を返すと
You can’t perform that action at this time.
0 commit comments