🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Class Phalcon\\Paginator\\Adapter\\QueryBuilder # Class **Phalcon\\Paginator\\Adapter\\QueryBuilder** *extends* abstract class [*Phalcon\\Paginator\\Adapter*](#) *implements*[*Phalcon\\Paginator\\AdapterInterface*](#) Pagination using a PHQL query builder as source of data ``` <pre class="calibre14">``` <?php $builder = $this->modelsManager->createBuilder() ->columns('id, name') ->from('Robots') ->orderBy('name'); $paginator = new Phalcon\Paginator\Adapter\QueryBuilder(array( "builder" => $builder, "limit"=> 20, "page" => 1 )); ``` ``` ### Methods public **\_\_construct** (*unknown* $config) public **getCurrentPage** () Get the current page number public **setQueryBuilder** (*unknown* $builder) Set query builder object public **getQueryBuilder** () Get query builder object public **getPaginate** () Returns a slice of the resultset to show in the pagination public **setCurrentPage** (*unknown* $page) inherited from Phalcon\\Paginator\\Adapter Set the current page number public **setLimit** (*unknown* $limitRows) inherited from Phalcon\\Paginator\\Adapter Set current rows limit public **getLimit** () inherited from Phalcon\\Paginator\\Adapter Get current rows limit | - [索引](# "总目录") - [下一页](# "Class Phalcon\Paginator\Exception") | - [上一页](# "Class Phalcon\Paginator\Adapter\NativeArray") | - [API Indice](#) »