Class Phalcon\Paginator\Factory

extends abstract class Phalcon\Factory

implements Phalcon\FactoryInterface

Source on GitHub

Loads Paginator Adapter class using ‘adapter’ option


use Phalcon\Paginator\Factory;

 * The `modelsManager` is automatically created when you instantiate your DI
 * container using the `FactoryDefault` class. It returns a 
 * [Phalcon\Mvc\Model\Manager](/3.4/en/api/Phalcon_Mvc_Model_Manager) object

$builder = $this->modelsManager->createBuilder()
                ->columns("id, name")

$options = [
    "builder" => $builder,
    "limit"   => 20,
    "page"    => 1,
    "adapter" => "queryBuilder",
$paginator = Factory::load($options);


public static load (Phalcon\Config array $config)

protected static loadClass (mixed $namespace, mixed $config) inherited from Phalcon\Factory