PHP Class WoohooLabs\Yin\JsonApi\Request\Pagination\OffsetBasedPagination

Show file Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Property Type Description
$limit integer | null
$offset integer | null

Public Methods

Method Description
__construct ( integer | null $offset, integer | null $limit )
fromPaginationQueryParams ( array $paginationQueryParams, mixed $defaultOffset = null, mixed $defaultLimit = null )
getLimit ( ) : integer | null
getOffset ( ) : integer | null
getPaginationQueryString ( integer $offset, integer $limit ) : string

Method Details

__construct() public method

public __construct ( integer | null $offset, integer | null $limit )
$offset integer | null
$limit integer | null

fromPaginationQueryParams() public static method

public static fromPaginationQueryParams ( array $paginationQueryParams, mixed $defaultOffset = null, mixed $defaultLimit = null )
$paginationQueryParams array
$defaultOffset mixed
$defaultLimit mixed

getLimit() public method

public getLimit ( ) : integer | null
return integer | null

getOffset() public method

public getOffset ( ) : integer | null
return integer | null

getPaginationQueryString() public static method

public static getPaginationQueryString ( integer $offset, integer $limit ) : string
$offset integer
$limit integer
return string

Property Details

$limit protected property

protected int|null $limit
return integer | null

$offset protected property

protected int|null $offset
return integer | null