A few more tweaks to the paginator class.

This commit is contained in:
Taylor Otwell 2011-07-25 13:34:54 -07:00
parent 873e4ee2d7
commit a6a2588ed1
1 changed files with 1 additions and 3 deletions

View File

@ -47,12 +47,10 @@ class Paginator {
*/ */
public function __construct($results, $total, $per_page) public function __construct($results, $total, $per_page)
{ {
$this->page = static::page($total, $per_page);
$this->per_page = $per_page; $this->per_page = $per_page;
$this->results = $results; $this->results = $results;
$this->total = $total; $this->total = $total;
// Determine the current page based on the total results and per page limit.
$this->page = static::page($this->total, $this->per_page);
} }
/** /**