class Cursor implements Arrayable

Methods

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

Create a new cursor instance.

mixed
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(mixed $encodedString)

Get a cursor instance from the encoded string representation.

Details

at line 24
__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

Exceptions

InvalidArgumentException

at line 41
mixed parameter(string $parameterName)

Get the given parameter from the cursor.

Parameters

string $parameterName

Return Value

mixed

Exceptions

UnexpectedValueException

at line 56
array parameters(array $parameterNames)

Get the given parameters from the cursor.

Parameters

array $parameterNames

Return Value

array

at line 66
bool pointsToNextItems()

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

Return Value

bool

at line 74
bool pointsToPreviousItems()

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

Return Value

bool

at line 84
array toArray()

Get the array representation of the cursor.

Return Value

array

at line 96
string encode()

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

Return Value

string

Exceptions

JsonException

at line 104
static Cursor|null fromEncoded(mixed $encodedString)

Get a cursor instance from the encoded string representation.

Parameters

mixed $encodedString

Return Value

Cursor|null