Skip to content

Commit

Permalink
Renaming "$pager" to "$authorPager"
Browse files Browse the repository at this point in the history
Using declared $authorPager variable name instead of $pager variable, which wasn't declared.
  • Loading branch information
Alex committed Oct 4, 2012
1 parent 440bc4c commit 8528d77
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions documentation/03-basic-crud.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ foreach ($authorPager as $author) {
echo $author->getFirstName();
}
// A pager object gives more information
echo $pager->getNbResults(); // total number of results if not paginated
echo $pager->haveToPaginate(); // return true if the total number of results exceeds the maximum per page
echo $pager->getFirstIndex(); // index of the first result in the page
echo $pager->getLastIndex(); // index of the last result in the page
$links = $pager->getLinks(5); // array of page numbers around the current page; useful to display pagination controls
echo $authorPager->getNbResults(); // total number of results if not paginated
echo $authorPager->haveToPaginate(); // return true if the total number of results exceeds the maximum per page
echo $authorPager->getFirstIndex(); // index of the first result in the page
echo $authorPager->getLastIndex(); // index of the last result in the page
$links = $authorPager->getLinks(5); // array of page numbers around the current page; useful to display pagination controls
{% endhighlight %}

## Collections And On-Demand Hydration ##
Expand Down

0 comments on commit 8528d77

Please sign in to comment.