Does Phalcon\Paginator\Adapter\Model not support MongoDB collections?


I have the following code:

use Phalcon\Paginator\Adapter\Model as Paginator;

// ...

$result = MyCollection::find();

$paginator = new Paginator(array(
    "data" => $result,
    "limit"=> 25,
    "page" => $numberPage,

$this->view->page = $paginator->getPaginate();

I thought it would have been neat if this class could handle mutliple types (and in my view I'd still have $page->total_pages, $page->current, $page->before etc). Or, do I neeed to create my own Paginator to handle these dataset?


You can check our vegas-cmf/core Mongo adapter for Pagination: Cheers!