PHP Class phpDataMapper_Pager, phpDataMapper

Exibir arquivo Open project: vlucas/phpDataMapper

Protected Properties

Property Type Description
$_itemCount
$_itemsPerPage
$_mapper
$_page
$_query

Public Methods

Method Description
__construct ( phpDataMapper_Query $query, $page = 1, $itemsPerPage = 30 )
count ( ) : integer Get row offset for SQL query
offset ( ) : integer Get row offset for SQL query
page ( $page = null ) Get/Set current page
pages ( ) Get total number of pages page
perPage ( $perPage = null ) Set items per page limit

Method Details

__construct() public method

public __construct ( phpDataMapper_Query $query, $page = 1, $itemsPerPage = 30 )
$query phpDataMapper_Query

count() public method

Get row offset for SQL query
public count ( ) : integer
return integer

offset() public method

Get row offset for SQL query
public offset ( ) : integer
return integer

page() public method

Get/Set current page
public page ( $page = null )
$page int

pages() public method

Get total number of pages page
public pages ( )

perPage() public method

Set items per page limit
public perPage ( $perPage = null )

Property Details

$_itemCount protected_oe property

protected $_itemCount

$_itemsPerPage protected_oe property

protected $_itemsPerPage

$_mapper protected_oe property

protected $_mapper

$_page protected_oe property

protected $_page

$_query protected_oe property

protected $_query