src/Leevel/Database/Select.php
public function asClass(string $className, array $args = []): self
    {
        $this->queryParams['as_class'] = $className;
        $this->queryParams['class_args'] = $args;
        $this->queryParams['as_default'] = false;

        return $this;
    }
public function asClass(string $className, array $args = []): self
    {
        $this->queryParams['as_class'] = $className;
        $this->queryParams['class_args'] = $args;
        $this->queryParams['as_default'] = false;

        return $this;
    }
设置以类返会结果.

@param string $className
@param array  $args

@return $this