src/PHPDish/Bundle/PostBundle/Service/PostManager.php
public function findPostsPager(Criteria $criteria, $page = 1, $limit = null)
    {
        $query = $this->getPostRepository()->createQueryBuilder('p')
            ->addCriteria($criteria)
            ->getQuery();

        return $this->createPaginator($query, $page, $limit);
    }
public function findPostsPager(Criteria $criteria, $page = 1, $limit = null)
    {
        $query = $this->getPostRepository()->createQueryBuilder('p')
            ->addCriteria($criteria)
            ->getQuery();

        return $this->createPaginator($query, $page, $limit);
    }
{@inheritdoc}