PHP 클래스 Tdt\Core\Pager

저자: Michiel Vancoillie ([email protected])
저자: Jan Vansteenlandt ([email protected])
파일 보기 프로젝트 열기: tdt/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$DEFAULT_PAGE_SIZE
$PAGING_KEYWORDS

공개 메소드들

메소드 설명
buildQuerystring ( ) : string Build the query string from the request
calculateLimitAndOffset ( $limit = null ) Calculate the limit and offset based on the request string parameters.
calculatePagingHeaders ( integer $limit, integer $offset, integer $total_rows ) : array Calculate the link meta-data for paging purposes, return an array with paging information
setDefaultLimit ( $limit )

보호된 메소드들

메소드 설명
getLinkHeader ( $paging ) Provide paging headers in the response using the Link HTTP header.

메소드 상세

buildQuerystring() 공개 정적인 메소드

If not empty, will return &a=b&c=d
public static buildQuerystring ( ) : string
리턴 string

calculateLimitAndOffset() 공개 정적인 메소드

Calculate the limit and offset based on the request string parameters.
public static calculateLimitAndOffset ( $limit = null )

calculatePagingHeaders() 공개 정적인 메소드

Calculate the link meta-data for paging purposes, return an array with paging information
public static calculatePagingHeaders ( integer $limit, integer $offset, integer $total_rows ) : array
$limit integer
$offset integer
$total_rows integer The total amount of objects
리턴 array

getLinkHeader() 보호된 정적인 메소드

Provide paging headers in the response using the Link HTTP header.
protected static getLinkHeader ( $paging )

setDefaultLimit() 공개 정적인 메소드

public static setDefaultLimit ( $limit )

프로퍼티 상세

$DEFAULT_PAGE_SIZE 보호되어 있는 정적으로 프로퍼티

protected static $DEFAULT_PAGE_SIZE

$PAGING_KEYWORDS 보호되어 있는 정적으로 프로퍼티

protected static $PAGING_KEYWORDS