Tuple
final class Tuple implements Value, Countable, Iterator (View source)
A PHP representation of the CQL tuple datatype
Methods
Creates a new tuple with the given types.
Array of values in this tuple.
Sets the value at index in this tuple .
Retrieves the value at a given index.
Total number of elements in this tuple
Current element for iteration
Current key for iteration
Move internal iterator forward
Check whether a current value exists
Rewind internal iterator
Details
__construct(array $types)
Creates a new tuple with the given types.
Type
type()
The type of this tuple.
array
values()
Array of values in this tuple.
void
set(mixed $value)
Sets the value at index in this tuple .
mixed
get(int $index)
Retrieves the value at a given index.
int<0, max>
count()
Total number of elements in this tuple
TValue
current()
Current element for iteration
TKey|null
key()
Current key for iteration
void
next()
Move internal iterator forward
bool
valid()
Check whether a current value exists
void
rewind()
Rewind internal iterator