PHP Class Craft\ElementApi_PaginatorAdapter

Inheritance: implements League\Fractal\Pagination\PaginatorInterface
Mostra file Open project: pixelandtonic/ElementAPI Class Usage Examples

Protected Properties

Property Type Description
$count integer
$currentPage integer
$elementsPerPage integer
$pageParam string
$totalElements integer
$totalPages integer

Public Methods

Method Description
__construct ( integer $elementsPerPage, integer $totalElements, $pageParam ) Constructor
getCount ( ) : integer Get the count.
getCurrentPage ( ) : integer Get the current page.
getLastPage ( ) : integer Get the last page.
getPerPage ( ) : integer Get the number per page.
getTotal ( ) : integer Get the total.
getUrl ( integer $page ) : string Get the url for the given page.
setCount ( integer $count ) Sets the count.

Private Methods

Method Description
_getCurrentPage ( ) : integer Determines the current page.

Method Details

__construct() public method

Constructor
public __construct ( integer $elementsPerPage, integer $totalElements, $pageParam )
$elementsPerPage integer
$totalElements integer

getCount() public method

Get the count.
public getCount ( ) : integer
return integer

getCurrentPage() public method

Get the current page.
public getCurrentPage ( ) : integer
return integer

getLastPage() public method

Get the last page.
public getLastPage ( ) : integer
return integer

getPerPage() public method

Get the number per page.
public getPerPage ( ) : integer
return integer

getTotal() public method

Get the total.
public getTotal ( ) : integer
return integer

getUrl() public method

Get the url for the given page.
public getUrl ( integer $page ) : string
$page integer
return string

setCount() public method

Sets the count.
public setCount ( integer $count )
$count integer

Property Details

$count protected_oe property

protected int $count
return integer

$currentPage protected_oe property

protected int $currentPage
return integer

$elementsPerPage protected_oe property

protected int $elementsPerPage
return integer

$pageParam protected_oe property

protected string $pageParam
return string

$totalElements protected_oe property

protected int $totalElements
return integer

$totalPages protected_oe property

protected int $totalPages
return integer