modify mysql result
This commit is contained in:
+6
-5
@@ -16,15 +16,16 @@ class HasCount extends HasBase
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return ActiveQuery
|
||||
* @throws ActiveQuery|static
|
||||
* @return static
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (!method_exists($this, $name)) {
|
||||
return $this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
}
|
||||
return call_user_func([$this, $name], ...$arguments);
|
||||
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
} else {
|
||||
call_user_func([$this, $name], ...$arguments);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-4
@@ -24,14 +24,16 @@ class HasMany extends HasBase
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return ActiveQuery|static
|
||||
* @return static
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (!method_exists($this, $name)) {
|
||||
return $this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
}
|
||||
return call_user_func([$this, $name], ...$arguments);
|
||||
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
} else {
|
||||
call_user_func([$this, $name], ...$arguments);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-4
@@ -23,14 +23,16 @@ class HasOne extends HasBase
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return ActiveQuery|static
|
||||
* @return static
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if (!method_exists($this, $name)) {
|
||||
return $this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
}
|
||||
return call_user_func([$this, $name], ...$arguments);
|
||||
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
|
||||
} else {
|
||||
call_user_func([$this, $name], ...$arguments);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user