OffsetPage
class OffsetPage (View source)
| internal | JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it. |
Value object for containing the requested offset and page parameters.
Constants
| KEY_NAME |
The JSON:API pagination key name. |
| OFFSET_KEY |
The offset key in the page parameter: page[offset]. |
| SIZE_KEY |
The size key in the page parameter: page[limit]. |
| DEFAULT_OFFSET |
Default offset. |
| SIZE_MAX |
Max size. |
Properties
| protected int | $offset | The offset for the query. |
|
| protected int | $size | The size of the query. |
Methods
__construct(int $offset, int $size)
Instantiates an OffsetPage object.
int
getOffset()
Returns the current offset.
int
getSize()
Returns the page size.
static OffsetPage
createFromQueryParameter(mixed $parameter)
Creates an OffsetPage object from a query parameter.
Details
__construct(int $offset, int $size)
Instantiates an OffsetPage object.
int
getOffset()
Returns the current offset.
int
getSize()
Returns the page size.
static OffsetPage
createFromQueryParameter(mixed $parameter)
Creates an OffsetPage object from a query parameter.