mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Update DynamicModel.php
added note about limitations, i.e. no scenarios -> no safe attributes -> no load().
This commit is contained in:
@ -50,6 +50,10 @@ use yii\validators\Validator;
|
|||||||
* "dynamic attributes". It basically allows an attribute to be defined dynamically through its constructor
|
* "dynamic attributes". It basically allows an attribute to be defined dynamically through its constructor
|
||||||
* or [[defineAttribute()]].
|
* or [[defineAttribute()]].
|
||||||
*
|
*
|
||||||
|
* Note that it does not support the usual validation flow as normal models, i.e. no scenarios are being defined
|
||||||
|
* and therefor none of the attributes is safe. This means that [[load()]] will not be able to perform massive
|
||||||
|
* assignment and return `false`. Attributes should be assigned via constructor instead.
|
||||||
|
*
|
||||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user