mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正几处因为函数重载时参数与父类参数不同而出现的warn
This commit is contained in:
@@ -61,7 +61,7 @@ class Mongo extends Driver
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function connect($config = '', $linkNum = 0)
|
public function connect($config = '', $linkNum = 0, $autoConnection = false)
|
||||||
{
|
{
|
||||||
if (!isset($this->linkID[$linkNum])) {
|
if (!isset($this->linkID[$linkNum])) {
|
||||||
if (empty($config)) {
|
if (empty($config)) {
|
||||||
@@ -249,7 +249,7 @@ class Mongo extends Driver
|
|||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function insertAll($dataList, $options = [])
|
public function insertAll($dataList, $options = [], $replace = false)
|
||||||
{
|
{
|
||||||
if (isset($options['table'])) {
|
if (isset($options['table'])) {
|
||||||
$this->switchCollection($options['table']);
|
$this->switchCollection($options['table']);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class Mongo extends \Think\Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 插入数据前的回调方法
|
// 插入数据前的回调方法
|
||||||
protected function _before_insert(&$data, $options)
|
protected function _before_insert(&$data, $options = [])
|
||||||
{
|
{
|
||||||
// 写入数据到数据库
|
// 写入数据到数据库
|
||||||
if ($this->_autoInc && self::TYPE_INT == $this->_idType) {
|
if ($this->_autoInc && self::TYPE_INT == $this->_idType) {
|
||||||
@@ -119,7 +119,7 @@ class Mongo extends \Think\Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询成功后的回调方法
|
// 查询成功后的回调方法
|
||||||
protected function _after_select(&$resultSet, $options)
|
protected function _after_select(&$resultSet, $options = [])
|
||||||
{
|
{
|
||||||
array_walk($resultSet, [$this, 'checkMongoId']);
|
array_walk($resultSet, [$this, 'checkMongoId']);
|
||||||
}
|
}
|
||||||
@@ -185,7 +185,7 @@ class Mongo extends \Think\Model
|
|||||||
* @param integer $step 增长值
|
* @param integer $step 增长值
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function setInc($field, $step = 1)
|
public function setInc($field, $step = 1, $lazyTime = 0)
|
||||||
{
|
{
|
||||||
return $this->setField($field, ['inc', $step]);
|
return $this->setField($field, ['inc', $step]);
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ class Mongo extends \Think\Model
|
|||||||
* @param integer $step 减少值
|
* @param integer $step 减少值
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function setDec($field, $step = 1)
|
public function setDec($field, $step = 1, $lazyTime = 0)
|
||||||
{
|
{
|
||||||
return $this->setField($field, ['inc', '-' . $step]);
|
return $this->setField($field, ['inc', '-' . $step]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user