src/Doctrine/MongoDBPagerProvider.php
public function provide(array $options = array())
    {
        $options = array_replace($this->baseOptions, $options);

        $manager = $this->doctrine->getManagerForClass($this->objectClass);
        $repository = $manager->getRepository($this->objectClass);

        $pager = new PagerfantaPager(new Pagerfanta(
            new DoctrineODMMongoDBAdapter(call_user_func([$repository, $options['query_builder_method']]))
        ));

        $this->registerListenersService->register($manager, $pager, $options);

        return $pager;
    }
public function provide(array $options = array())
    {
        $options = array_replace($this->baseOptions, $options);

        $manager = $this->doctrine->getManagerForClass($this->objectClass);
        $repository = $manager->getRepository($this->objectClass);

        $pager = new PagerfantaPager(new Pagerfanta(
            new DoctrineODMMongoDBAdapter(call_user_func([$repository, $options['query_builder_method']]))
        ));

        $this->registerListenersService->register($manager, $pager, $options);

        return $pager;
    }
{@inheritdoc}