AR的生命周期
2019-07-23 10:54:48 1 举报
AI智能生成
Yii2 AR执行流程
作者其他创作
大纲/内容
AR的生命周期
实例化AR对象
构造方法constructor
执行yii\\db\\ActiveRecord::init()
触发yii\\db\\ActiveRecord::EVENT_INIT事件
yii\\db\\ActiveRecord::find()|find()
执行yii\\db\\ActiveRecord::afterFind()|afterFind()
触发 yii\\db\\ActiveRecord::EVENT_AFTER_FIND|EVENT_AFTER_FIND
yii\\db\\ActiveRecord::save()|save()
执行yii\\db\\ActiveRecord::beforeValidate()|beforeValidate()
触发yii\\db\\ActiveRecord::EVENT_BEFORE_VALIDATE|EVENT_BEFORE_VALIDATE事件
执行yii\\db\\ActiveRecord::afterValidate()|afterValidate()
触发yii\\db\\ActiveRecord::EVENT_AFTER_VALIDATE|EVENT_AFTER_VALIDATE事件
执行yii\\db\\ActiveRecord::beforeSave()|beforeSave()
触发yii\\db\\ActiveRecord::EVENT_BEFORE_INSERT|EVENT_BEFORE_INSERT事件
触发yii\\db\\ActiveRecord::EVENT_BEFORE_UPDATE|EVENT_BEFORE_UPDATE事件
执行yii\\db\\ActiveRecord::afterSave()|afterSave()
触发yii\\db\\ActiveRecord::EVENT_AFTER_INSERT|EVENT_AFTER_INSERT事件
触发yii\\db\\ActiveRecord::EVENT_AFTER_UPDATE|EVENT_AFTER_UPDATE事件
yii\\db\\ActiveRecord::delete()|delete()
执行yii\\db\\ActiveRecord::beforeDelete()|beforeDelete()
触发yii\\db\\ActiveRecord::EVENT_BEFORE_DELETE|EVENT_BEFORE_DELETE 事件
执行yii\\db\\ActiveRecord::afterDelete()|afterDelete()
触发yii\\db\\ActiveRecord::EVENT_AFTER_DELETE|EVENT_AFTER_DELETE 事件
0 条评论
回复 删除
下一页