mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
统一方法声明参数
This commit is contained in:
@@ -235,10 +235,10 @@ class Model
|
||||
return $result;
|
||||
}
|
||||
// 插入数据前的回调方法
|
||||
protected function _before_insert(&$data, $options)
|
||||
protected function _before_insert(&$data, $options = [])
|
||||
{}
|
||||
// 插入成功后的回调方法
|
||||
protected function _after_insert($data, $options)
|
||||
protected function _after_insert($data, $options = [])
|
||||
{}
|
||||
|
||||
public function addAll($dataList, $options = [], $replace = false)
|
||||
@@ -336,10 +336,10 @@ class Model
|
||||
return $result;
|
||||
}
|
||||
// 更新数据前的回调方法
|
||||
protected function _before_update(&$data, $options)
|
||||
protected function _before_update(&$data, $options = [])
|
||||
{}
|
||||
// 更新成功后的回调方法
|
||||
protected function _after_update($data, $options)
|
||||
protected function _after_update($data, $options = [])
|
||||
{}
|
||||
|
||||
/**
|
||||
@@ -409,7 +409,7 @@ class Model
|
||||
return $result;
|
||||
}
|
||||
// 删除成功后的回调方法
|
||||
protected function _after_delete($data, $options)
|
||||
protected function _after_delete($data, $options = [])
|
||||
{}
|
||||
|
||||
/**
|
||||
@@ -512,7 +512,7 @@ class Model
|
||||
return $resultSet;
|
||||
}
|
||||
// 查询成功后的回调方法
|
||||
protected function _after_select(&$resultSet)
|
||||
protected function _after_select(&$resultSet, $options = [])
|
||||
{}
|
||||
|
||||
/**
|
||||
@@ -689,7 +689,7 @@ class Model
|
||||
return $data;
|
||||
}
|
||||
// 数据读取成功后的回调方法
|
||||
protected function _after_find(&$result)
|
||||
protected function _after_find(&$result, $options = [])
|
||||
{}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ trait Relation
|
||||
}
|
||||
|
||||
// 查询成功后的回调方法
|
||||
protected function _after_find(&$result, $options)
|
||||
protected function _after_find(&$result, $options = [])
|
||||
{
|
||||
// 获取关联数据 并附加到结果中
|
||||
if (!empty($options['link'])) {
|
||||
@@ -45,7 +45,7 @@ trait Relation
|
||||
}
|
||||
|
||||
// 查询数据集成功后的回调方法
|
||||
protected function _after_select(&$result, $options)
|
||||
protected function _after_select(&$result, $options = [])
|
||||
{
|
||||
// 获取关联数据 并附加到结果中
|
||||
if (!empty($options['link'])) {
|
||||
@@ -55,7 +55,7 @@ trait Relation
|
||||
}
|
||||
|
||||
// 写入成功后的回调方法
|
||||
protected function _after_insert($data, $options)
|
||||
protected function _after_insert($data, $options = [])
|
||||
{
|
||||
// 关联写入
|
||||
if (!empty($options['link'])) {
|
||||
@@ -65,7 +65,7 @@ trait Relation
|
||||
}
|
||||
|
||||
// 更新成功后的回调方法
|
||||
protected function _after_update($data, $options)
|
||||
protected function _after_update($data, $options = [])
|
||||
{
|
||||
// 关联更新
|
||||
if (!empty($options['link'])) {
|
||||
@@ -75,7 +75,7 @@ trait Relation
|
||||
}
|
||||
|
||||
// 删除成功后的回调方法
|
||||
protected function _after_delete($data, $options)
|
||||
protected function _after_delete($data, $options = [])
|
||||
{
|
||||
// 关联删除
|
||||
if (!empty($options['link'])) {
|
||||
|
||||
Reference in New Issue
Block a user