class Cursor implements Arrayable

Methods

__construct(array $parameters, bool $pointsToNextItems = true)

Create a new cursor instance.

string|int|null
parameter(string $parameterName)

Get the given parameter from the cursor.

array
parameters(array $parameterNames)

Get the given parameters from the cursor.

bool
pointsToNextItems()

Determine whether the cursor points to the next set of items.

bool
pointsToPreviousItems()

Determine whether the cursor points to the previous set of items.

array
toArray()

Get the array representation of the cursor.

string
encode()

Get the encoded string representation of the cursor to construct a URL.

static Cursor|null
fromEncoded(string|null $encodedString)

Get a cursor instance from the encoded string representation.

Details

at line 20
__construct(array $parameters, bool $pointsToNextItems = true)

Create a new cursor instance.

Parameters

array $parameters

the parameters associated with the cursor

bool $pointsToNextItems

determine whether the cursor points to the next or previous set of items

at line 31
string|int|null parameter(string $parameterName)

Get the given parameter from the cursor.

Parameters

string $parameterName

Return Value

string|int|null

Exceptions

UnexpectedValueException

at line 46
array parameters(array $parameterNames)

Get the given parameters from the cursor.

Parameters

array $parameterNames

Return Value

array

at line 56
bool pointsToNextItems()

Determine whether the cursor points to the next set of items.

Return Value

bool

at line 64
bool pointsToPreviousItems()

Determine whether the cursor points to the previous set of items.

Return Value

bool

at line 74
array toArray()

Get the array representation of the cursor.

Return Value

array

at line 84
string encode()

Get the encoded string representation of the cursor to construct a URL.

Return Value

string

at line 92
static Cursor|null fromEncoded(string|null $encodedString)

Get a cursor instance from the encoded string representation.

Parameters

string|null $encodedString

Return Value

Cursor|null