Last active
April 8, 2016 12:34
-
-
Save rtuin/d87f459ed78ad3abd67191340dc7ca94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snc_redis: | |
clients: | |
doctrine_meta: | |
type: phpredis | |
alias: doctrine_meta | |
dsn: redis://localhost/2 | |
doctrine: | |
metadata_cache: | |
client: doctrine_meta | |
entity_manager: default # the name of your entity_manager connection | |
document_manager: default # the name of your document_manager connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Doctrine\ORM\Tools\Pagination\Paginator; | |
$paginator = new Paginator($queryBuilder); | |
$totalRecords = $paginator->count(); | |
$recordsForPage = $paginator->getIterator(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$queryBuilder | |
->setFirstResult($start) | |
->setMaxResults($limit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment