class ListData extends Data (View source)

Traits

Methods

array
tokens()

Get the response tokens.

Token|Data|null
tokenAt(int $index)

Get the response token at the given index.

array
tokensAfter(int $index)

Get the response tokens after the given index.

__construct(array $tokens)

Constructor.

from  Data
Token|Data|null
first()

Get the first token.

from  Data
Token|Data|null
last()

Get the last token.

from  Data
bool
contains(array|string $needles)

Determine if the data contains a specific value.

from  Data
array
values()

Get all the token's values.

from  Data
Data|Token|null
lookup(string $field)

Find the immediate successor token of the given field in the list.

string
__toString()

Get the list as a string.

Details

abstract array tokens()

Get the response tokens.

Return Value

array

Token|Data|null tokenAt(int $index)

Get the response token at the given index.

Parameters

int $index

Return Value

Token|Data|null

array tokensAfter(int $index)

Get the response tokens after the given index.

Parameters

int $index

Return Value

array

__construct(array $tokens)

Constructor.

Parameters

array $tokens

Token|Data|null first()

Get the first token.

Return Value

Token|Data|null

Token|Data|null last()

Get the last token.

Return Value

Token|Data|null

bool contains(array|string $needles)

Determine if the data contains a specific value.

Parameters

array|string $needles

Return Value

bool

array values()

Get all the token's values.

Return Value

array

Data|Token|null lookup(string $field)

Find the immediate successor token of the given field in the list.

Parameters

string $field

Return Value

Data|Token|null

string __toString()

Get the list as a string.

Return Value

string