Permalink
Browse files

allow results to be set manually

In some cases, you already know the number of results, for example if you cache them in a separate field. Then, it is not necessary to issue an extra query through the adapter.
  • Loading branch information...
1 parent 486a9b8 commit 7822c28c328c55d5946b0b6bb02f52c824c7e419 @schmittjoh schmittjoh committed Aug 22, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/Pagerfanta/Pagerfanta.php
@@ -169,6 +169,11 @@ public function getNbResults()
return $this->nbResults;
}
+
+ public function setNbResults($count)
+ {
+ $this->nbResults = (integer) $count;
+ }
/**
* {@inheritdoc}

0 comments on commit 7822c28

Please sign in to comment.