mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
Think\Model类调整,包括:
_scope属性改为scope _map属性改为map _facade方法改为_write_data 增加_read_data方法 增加_read_datalist 方法 增加map连贯操作 用于动态设置字段映射
This commit is contained in:
@@ -37,7 +37,7 @@ trait Extend {
|
||||
$name = parse_name(substr($method,10));
|
||||
$where[$name] =$args[0];
|
||||
return $this->where($where)->getField($args[1]);
|
||||
}elseif(isset($this->_scope[$method])){// 命名范围的单独调用支持
|
||||
}elseif(isset($this->scope[$method])){// 命名范围的单独调用支持
|
||||
return $this->scope($method,$args[0]);
|
||||
}else{
|
||||
E(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_'));
|
||||
|
||||
@@ -73,7 +73,7 @@ trait Relation {
|
||||
* @param mixed $data 要操作的数据
|
||||
* @return boolean
|
||||
*/
|
||||
protected function _facade($data) {
|
||||
protected function _write_data($data) {
|
||||
$this->_before_write($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user