thinkphp源码无差别阅读(三十一)
ORM阅读
model/concern/ModelEvent.php
属性:event、、withEvent
设置事件:setEvent
设置事件是否需要响应:withEvent
触发事件:trigger
model/concern/OptimLock.php
未知:getOptimLockField
数据检查:checkData
记录乐观锁:recordLockVersion
更新乐观锁:updateLockVersion
获取更新条件:getWhere
未知:checkResult
model/concern/RelationShip.php
属性:parent、relation、together、relationWrite
设置父关联对象:setParent
获取父关联对象:getParent
获取当前模型的关联模型数据:getRelation
设置关联数据:setRelation
查询关联数据:relationQuery
关联数据写入:together
根据关联条件查询当前模型:has
根据关联条件查询当前模型:hasWhere+
预载于关联查询:eagerly
预载于关联查询:eagerlyResultSet
预载于关联查询:eagerlyResult
绑定属性:bindAttr
关联统计:relationCount
关联定义:hasOne
关联定义:belongsTo
关联定义:hasMany
远程关联定义:hasManyThrough
远程关联定义:hasOneThrough
关联定义:belongsToMany
关联定义:morphOne
关联定义:morphMany
关联定义:morphTo
关联定义:morphToMany
关联定义:morphByMany
解析模型:parseModel
获取外键:getForeignKey
检查是否是关联属性:isRelationAttr
获取关联数据:getRelationData
关联数据自动写入检查:checkAutoRelationWrite
自动关联数据更新:autoRelationUpdate
自动关联数据写入:autoRelationInsert
自动关联数据删除:autoRelationDelete
移除关联属性:autoRelationDelete
计划阅读
[]framework源码[]orm源码[]helper源码