PHP Class Recurly_Pager, recurly-client-php

The pager moves forward only and can rewind to the first item.
Inheritance: extends Recurly_Base, implements Iterator
ファイルを表示 Open project: recurly/recurly-client-php Class Usage Examples

Protected Properties

Property Type Description
$_count position within the current page
$_objects total number of records

Public Methods

Method Description
__toString ( )
count ( ) : integer Number of records in this list.
current ( ) : Recurly_Resource The current object
key ( ) : integer
next ( ) Increments the position to the next element
rewind ( ) Rewind to the beginning
valid ( ) : boolean

Protected Methods

Method Description
_afterParseResponse ( $response, $uri )
_loadFrom ( $uri ) Load another page of results into this pager.
_setState ( $params, $state )
updateErrorAttributes ( )

Private Methods

Method Description
_loadLinks ( $response ) The 'Links' header contains links to the next, previous, and starting pages.
_loadRecordCount ( $response ) Find the total number of results in the collection from the 'X-Records' header.

Method Details

__toString() public method

public __toString ( )

_afterParseResponse() protected method

protected _afterParseResponse ( $response, $uri )

_loadFrom() protected method

Load another page of results into this pager.
protected _loadFrom ( $uri )

_setState() protected static method

protected static _setState ( $params, $state )

count() public method

Number of records in this list.
public count ( ) : integer
return integer number of records in list

current() public method

The current object
public current ( ) : Recurly_Resource
return Recurly_Resource the current object

key() public method

public key ( ) : integer
return integer current position within the current page

next() public method

Increments the position to the next element
public next ( )

rewind() public method

Rewind to the beginning
public rewind ( )

updateErrorAttributes() protected method

protected updateErrorAttributes ( )

valid() public method

public valid ( ) : boolean
return boolean True if the current position is valid.

Property Details

$_count protected_oe property

position within the current page
protected $_count

$_objects protected_oe property

total number of records
protected $_objects