PHP Class Phalcon\Paginator\Pager

Inheritance: implements IteratorAggregate, implements Countable
ファイルを表示 Open project: phalcon/incubator Class Usage Examples

Protected Properties

Property Type Description
$limit integer | null Current rows limit (if provided)
$options array Array with options.
$paginateResult stdClass Phalcon's paginate result.

Public Methods

Method 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.

Protected Methods

Method Description
getRangeClass ( ) : string RangeClass option getter.
getRangeLength ( ) : integer RangeLength option getter.

Method Details

__construct() public method

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 method

public count ( ) : integer
return integer

getCurrentPage() public method

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

getFirstPage() public method

Returns the first page.
public getFirstPage ( ) : integer
return integer

getIterator() public method

getLastPage() public method

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

getLayout() public method

Returns the layout object.
public getLayout ( ) : Layout
return Phalcon\Paginator\Pager\Layout

getLimit() public method

Get current rows limit (if provided)
public getLimit ( ) : integer | null
return integer | null

getNextPage() public method

Returns the next page.
public getNextPage ( ) : integer
return integer

getPagesInRange() public method

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

getPreviousPage() public method

Returns the previous page.
public getPreviousPage ( ) : integer
return integer

getRangeClass() protected method

RangeClass option getter.
protected getRangeClass ( ) : string
return string range class name

getRangeLength() protected method

RangeLength option getter.
protected getRangeLength ( ) : integer
return integer range length

haveToPaginate() public method

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

Property Details

$limit protected_oe property

Current rows limit (if provided)
protected int|null $limit
return integer | null

$options protected_oe property

Array with options.
protected array $options
return array

$paginateResult protected_oe property

Phalcon's paginate result.
protected stdClass $paginateResult
return stdClass