src/Leevel/Database/Select.php
public function pagePrevNext(int $currentPage, int $perPage = 10, bool $flag = false, array $option = []): array
    {
        $page = new Page($currentPage, $perPage, null, $option);

        return [
            $page,
            $this
                ->limit($page->getFromRecord(), $perPage)
                ->findAll($flag),
            self::PAGE => true,
        ];
    }
public function pagePrevNext(int $currentPage, int $perPage = 10, bool $flag = false, array $option = []): array
    {
        $page = new Page($currentPage, $perPage, null, $option);

        return [
            $page,
            $this
                ->limit($page->getFromRecord(), $perPage)
                ->findAll($flag),
            self::PAGE => true,
        ];
    }
创建一个只有上下页的分页查询.

@param int   $currentPage
@param int   $perPage
@param bool  $flag
@param array $option

@return array