mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Model类toCollection方法
This commit is contained in:
@@ -654,7 +654,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
if ($this->resultSetType) {
|
if ($this->resultSetType) {
|
||||||
if ('collection' == $this->resultSetType) {
|
if ('collection' == $this->resultSetType) {
|
||||||
$collection = new Collection($collection);
|
$collection = new Collection($collection);
|
||||||
} else {
|
} elseif (false !== strpos($this->resultSetType, '\\')) {
|
||||||
$class = $this->resultSetType;
|
$class = $this->resultSetType;
|
||||||
$collection = new $class($collection);
|
$collection = new $class($collection);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user