src/Leevel/Database/Ddd/Select.php
protected function conversionToEntitys($result): array
    {
        $type = '';

        if ($result instanceof Collection) {
            $arr = [];

            foreach ($result as $entity) {
                $arr[] = $entity;
            }

            $result = $arr;
            $type = 'collection';
        } elseif (is_object($result) && $result instanceof IEntity) {
            $result = [$result];
            $type = 'entity';
        }

        return [$result, $type];
    }
protected function conversionToEntitys($result): array
    {
        $type = '';

        if ($result instanceof Collection) {
            $arr = [];

            foreach ($result as $entity) {
                $arr[] = $entity;
            }

            $result = $arr;
            $type = 'collection';
        } elseif (is_object($result) && $result instanceof IEntity) {
            $result = [$result];
            $type = 'entity';
        }

        return [$result, $type];
    }
转换结果到模型实体类型.

@param mixed $result

@return array