class Paginator

Methods

__construct(object $renderer)

No description

setMaxPagesToShow(int $maxPagesToShow)

No description

int
getMaxPagesToShow()

No description

setCurrentPage(int $currentPage)

No description

int
getCurrentPage()

No description

setItemsPerPage(int $itemsPerPage)

No description

int
getItemsPerPage()

No description

setTotalItems(int $totalItems)

No description

int
getTotalItems()

No description

int
getNumPages()

No description

setRequest(Request $request)

No description

string
getRequest()

No description

setup(int $totalItems, int $itemsPerPage, int $currentPage, Request $request)

No description

string
getPageCall(int $pageNum)

No description

getNextPage()

No description

getPrevPage()

No description

getNextCall()

No description

string|null
getPrevCall()

No description

array
getPages()

Get an array of paginated page data.

string
toHtml()

Render an HTML pagination control.

string
__toString()

Render an HTML pagination control.

getCurrentPageFirstItem()

No description

getCurrentPageLastItem()

No description

setPreviousText($text)

No description

getPreviousText()

No description

setNextText($text)

No description

getNextText()

No description

Details

at line line 61
__construct(object $renderer)

Parameters

object $renderer

at line line 75
setMaxPagesToShow(int $maxPagesToShow)

Parameters

int $maxPagesToShow

Exceptions

InvalidArgumentException if $maxPagesToShow is less than 3.

at line line 87
int getMaxPagesToShow()

Return Value

int

at line line 95
setCurrentPage(int $currentPage)

Parameters

int $currentPage

at line line 103
int getCurrentPage()

Return Value

int

at line line 111
setItemsPerPage(int $itemsPerPage)

Parameters

int $itemsPerPage

at line line 120
int getItemsPerPage()

Return Value

int

at line line 128
setTotalItems(int $totalItems)

Parameters

int $totalItems

at line line 137
int getTotalItems()

Return Value

int

at line line 145
int getNumPages()

Return Value

int

at line line 153
setRequest(Request $request)

Parameters

Request $request

at line line 166
string getRequest()

Return Value

string

at line line 177
setup(int $totalItems, int $itemsPerPage, int $currentPage, Request $request)

Parameters

int $totalItems
int $itemsPerPage
int $currentPage
Request $request

at line line 189
string getPageCall(int $pageNum)

Parameters

int $pageNum

Return Value

string

at line line 194
getNextPage()

at line line 204
getPrevPage()

at line line 214
getNextCall()

at line line 227
string|null getPrevCall()

Return Value

string|null

at line line 253
array getPages()

Get an array of paginated page data.

Example: array( array ('num' => 1, 'call' => '/example/page/1', 'isCurrent' => false), array ('num' => '...', 'call' => NULL, 'isCurrent' => false), array ('num' => 3, 'call' => '/example/page/3', 'isCurrent' => false), array ('num' => 4, 'call' => '/example/page/4', 'isCurrent' => true ), array ('num' => 5, 'call' => '/example/page/5', 'isCurrent' => false), array ('num' => '...', 'call' => NULL, 'isCurrent' => false), array ('num' => 10, 'call' => '/example/page/10', 'isCurrent' => false), )

Return Value

array

at line line 347
string toHtml()

Render an HTML pagination control.

Return Value

string

at line line 363
string __toString()

Render an HTML pagination control.

Return Value

string

at line line 368
getCurrentPageFirstItem()

at line line 380
getCurrentPageLastItem()

at line line 397
setPreviousText($text)

Parameters

$text

at line line 403
getPreviousText()

at line line 408
setNextText($text)

Parameters

$text

at line line 414
getNextText()