PHP Класс Prado\Data\SqlMap\DataMapper\TSqlMapPagedList

The maximum number of records fetched is 3 times the page size. It fetches the current, the previous and the next page at a time. This allows the paged list to determine if the page is a the begin, the middle or the end of the list. The paged list does not need to know about the total number of records.
С версии: 3.1
Наследование: extends Prado\Collections\TPagedList
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Prado\Data\SqlMap\Statements\IMappedStatement $statement, $parameter, $pageSize, $delegate = null, $page ) Create a new SqlMap paged list.
getIsLastPage ( ) : boolean
getIsMiddlePage ( ) : boolean
getIsNextPageAvailable ( ) : boolean
getIsPreviousPageAvailable ( ) : boolean
nextPage ( ) : integer | boolean Switches to the next page.
previousPage ( ) : integer | boolean Switches to the previous page.
setCustomPaging ( $value )

Защищенные методы

Метод Описание
fetchDataFromStatement ( $sender, $param ) Fetch data by executing the SqlMap statement.
getOffsetAndLimit ( $param ) : array Calculate the data fetch offsets and limits.
initialize ( $statement, $parameter, $pageSize, $page ) Initialize the paged list.
populateData ( $param, $data ) Populate the list with the fetched data.

Описание методов

__construct() публичный Метод

Create a new SqlMap paged list.
public __construct ( Prado\Data\SqlMap\Statements\IMappedStatement $statement, $parameter, $pageSize, $delegate = null, $page )
$statement Prado\Data\SqlMap\Statements\IMappedStatement

fetchDataFromStatement() защищенный Метод

Fetch data by executing the SqlMap statement.
protected fetchDataFromStatement ( $sender, $param )

getIsLastPage() публичный Метод

public getIsLastPage ( ) : boolean
Результат boolean true if is the very last page, false otherwise.

getIsMiddlePage() публичный Метод

public getIsMiddlePage ( ) : boolean
Результат boolean true if is not first nor last page, false otherwise.

getIsNextPageAvailable() публичный Метод

public getIsNextPageAvailable ( ) : boolean
Результат boolean true if the next page is available, false otherwise.

getIsPreviousPageAvailable() публичный Метод

public getIsPreviousPageAvailable ( ) : boolean
Результат boolean true if the previous page is available, false otherwise.

getOffsetAndLimit() защищенный Метод

Calculate the data fetch offsets and limits.
protected getOffsetAndLimit ( $param ) : array
Результат array 1st element is the offset, 2nd element is the limit.

initialize() защищенный Метод

Initialize the paged list.
protected initialize ( $statement, $parameter, $pageSize, $page )

nextPage() публичный Метод

Switches to the next page.
public nextPage ( ) : integer | boolean
Результат integer | boolean the new page index, false if next page is not availabe.

populateData() защищенный Метод

Populate the list with the fetched data.
protected populateData ( $param, $data )

previousPage() публичный Метод

Switches to the previous page.
public previousPage ( ) : integer | boolean
Результат integer | boolean the new page index, false if previous page is not availabe.

setCustomPaging() публичный Метод

public setCustomPaging ( $value )