PHP Class Phalcon\Paginator\Pager

Inheritance: implements IteratorAggregate, implements Countable
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Protected Properties

Свойство Type Description
$limit integer | null Current rows limit (if provided)
$options array Array with options.
$paginateResult stdClass Phalcon's paginate result.

Méthodes publiques

Méthode Description
__construct ( Phalcon\Paginator\AdapterInterface $adapter, array $options = [] ) Class constructor.
count ( ) : integer
getCurrentPage ( ) : integer Returns the current page.
getFirstPage ( ) : integer Returns the first page.
getIterator ( ) : ArrayIterator
getLastPage ( ) : integer Returns the last page.
getLayout ( ) : Layout Returns the layout object.
getLimit ( ) : integer | null Get current rows limit (if provided)
getNextPage ( ) : integer Returns the next page.
getPagesInRange ( ) : array Returns array of page numbers that are in range of slider.
getPreviousPage ( ) : integer Returns the previous page.
haveToPaginate ( ) : boolean Return true if it's necessary to paginate or false if not.

Méthodes protégées

Méthode Description
getRangeClass ( ) : string RangeClass option getter.
getRangeLength ( ) : integer RangeLength option getter.

Method Details

__construct() public méthode

Consumes Phalcon paginator adapter and options array. Option keys: - rangeClass: Class name which determines scrolling style type (e.g. Phalcon\Paginator\Pager\Range\Sliding). Defaults to "Phalcon\Paginator\Pager\Range\Sliding". - rangeLength: Size of range to be used. Default size is 10. - layoutClass: Used with getLayout() method. Defaults to "Phalcon\Paginator\Pager\Layout". - urlMask: Required with getLayout() method.
public __construct ( Phalcon\Paginator\AdapterInterface $adapter, array $options = [] )
$adapter Phalcon\Paginator\AdapterInterface Phalcon paginator adapter
$options array options array

count() public méthode

public count ( ) : integer
Résultat integer

getCurrentPage() public méthode

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

getFirstPage() public méthode

Returns the first page.
public getFirstPage ( ) : integer
Résultat integer

getIterator() public méthode

public getIterator ( ) : ArrayIterator
Résultat ArrayIterator

getLastPage() public méthode

Returns the last page.
public getLastPage ( ) : integer
Résultat integer

getLayout() public méthode

Returns the layout object.
public getLayout ( ) : Layout
Résultat Phalcon\Paginator\Pager\Layout

getLimit() public méthode

Get current rows limit (if provided)
public getLimit ( ) : integer | null
Résultat integer | null

getNextPage() public méthode

Returns the next page.
public getNextPage ( ) : integer
Résultat integer

getPagesInRange() public méthode

Returns array of page numbers that are in range of slider.
public getPagesInRange ( ) : array
Résultat array array of page numbers

getPreviousPage() public méthode

Returns the previous page.
public getPreviousPage ( ) : integer
Résultat integer

getRangeClass() protected méthode

RangeClass option getter.
protected getRangeClass ( ) : string
Résultat string range class name

getRangeLength() protected méthode

RangeLength option getter.
protected getRangeLength ( ) : integer
Résultat integer range length

haveToPaginate() public méthode

Return true if it's necessary to paginate or false if not.
public haveToPaginate ( ) : boolean
Résultat boolean

Property Details

$limit protected_oe property

Current rows limit (if provided)
protected int|null $limit
Résultat integer | null

$options protected_oe property

Array with options.
protected array $options
Résultat array

$paginateResult protected_oe property

Phalcon's paginate result.
protected stdClass $paginateResult
Résultat stdClass