PHP Class Adldap\Objects\Paginator

Inheritance: implements Countabl\Countable, implements IteratorAggregat\IteratorAggregate
Afficher le fichier Open project: adldap2/adldap2 Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
setCurrentOffset ( integer $offset ) : Paginator Sets the current offset number.
setCurrentPage ( integer $currentPage ) : Paginator Sets the current page number.
setPages ( integer $pages ) : Paginator Sets the total number of pages.
setPerPage ( integer $perPage = 50 ) : Paginator Sets the number of entries per page.
setResults ( array $results ) : Paginator Sets the results array property.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $results = [], integer $perPage = 50, integer $currentPage, integer $pages )
$results array
$perPage integer
$currentPage integer
$pages integer

count() public méthode

Returns the total amount of results.
public count ( ) : integer
Résultat integer

getCurrentOffset() public méthode

Returns the current offset number.
public getCurrentOffset ( ) : integer
Résultat integer

getCurrentPage() public méthode

Returns the current page number.
public getCurrentPage ( ) : integer
Résultat integer

getIterator() public méthode

Get an iterator for the entries.
public getIterator ( ) : ArrayIterator
Résultat ArrayIterator

getPages() public méthode

Returns the total amount of pages in a paginated result.
public getPages ( ) : integer
Résultat integer

getPerPage() public méthode

Returns the total amount of entries allowed per page.
public getPerPage ( ) : integer
Résultat integer

getResults() public méthode

Returns the complete results array.
public getResults ( ) : array
Résultat array

setCurrentOffset() protected méthode

Sets the current offset number.
protected setCurrentOffset ( integer $offset ) : Paginator
$offset integer
Résultat Paginator

setCurrentPage() protected méthode

Sets the current page number.
protected setCurrentPage ( integer $currentPage ) : Paginator
$currentPage integer
Résultat Paginator

setPages() protected méthode

Sets the total number of pages.
protected setPages ( integer $pages ) : Paginator
$pages integer
Résultat Paginator

setPerPage() protected méthode

Sets the number of entries per page.
protected setPerPage ( integer $perPage = 50 ) : Paginator
$perPage integer
Résultat Paginator

setResults() protected méthode

Sets the results array property.
protected setResults ( array $results ) : Paginator
$results array
Résultat Paginator

Property Details

$currentOffset protected_oe property

The current entry offset number.
protected int $currentOffset
Résultat integer

$currentPage protected_oe property

The current page number.
protected int $currentPage
Résultat integer

$pages protected_oe property

The total amount of pages.
protected int $pages
Résultat integer

$perPage protected_oe property

The amount of entries per page.
protected int $perPage
Résultat integer

$results protected_oe property

The complete results array.
protected array $results
Résultat array