ManaPHP\Mvc\Model\QueryBuilder::paginate PHP Method

paginate() public method

public paginate ( integer $size, integer $page, integer | array $cacheOptions = null ) : static
$size integer
$page integer
$cacheOptions integer | array
return static
    public function paginate($size, $page, $cacheOptions = null)
    {
        $this->paginator->items = $this->limit($size, ($page - 1) * $size)->executeEx($totalRows, $cacheOptions);
        $this->paginator->paginate($totalRows, $size, $page);
        return $this;
    }