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
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__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 )