Property | Type | Description | |
---|---|---|---|
$currentOffset | integer | The current entry offset number. | |
$currentPage | integer | The current page number. | |
$pages | integer | The total amount of pages. | |
$perPage | integer | The amount of entries per page. | |
$results | array | The complete results array. |
Method | Description | |
---|---|---|
__construct ( array $results = [], integer $perPage = 50, integer $currentPage, integer $pages ) | Constructor. | |
count ( ) : integer | Returns the total amount of results. | |
getCurrentOffset ( ) : integer | Returns the current offset number. | |
getCurrentPage ( ) : integer | Returns the current page number. | |
getIterator ( ) : ArrayIterator | Get an iterator for the entries. | |
getPages ( ) : integer | Returns the total amount of pages in a paginated result. | |
getPerPage ( ) : integer | Returns the total amount of entries allowed per page. | |
getResults ( ) : array | Returns the complete results array. |
Method | Description | |
---|---|---|
setCurrentOffset ( integer $offset ) : |
Sets the current offset number. | |
setCurrentPage ( integer $currentPage ) : |
Sets the current page number. | |
setPages ( integer $pages ) : |
Sets the total number of pages. | |
setPerPage ( integer $perPage = 50 ) : |
Sets the number of entries per page. | |
setResults ( array $results ) : |
Sets the results array property. |
public getCurrentOffset ( ) : integer | ||
return | integer |
public getCurrentPage ( ) : integer | ||
return | integer |
public getIterator ( ) : ArrayIterator | ||
return | ArrayIterator |
public getPerPage ( ) : integer | ||
return | integer |
public getResults ( ) : array | ||
return | array |
protected setCurrentOffset ( integer $offset ) : |
||
$offset | integer | |
return |
protected setCurrentPage ( integer $currentPage ) : |
||
$currentPage | integer | |
return |
protected setPerPage ( integer $perPage = 50 ) : |
||
$perPage | integer | |
return |
protected setResults ( array $results ) : |
||
$results | array | |
return |
protected int $currentOffset | ||
return | integer |