Set
final class Set implements Value, Countable, Iterator (View source)
A PHP representation of the CQL set datatype
Methods
Array of values in this set.
Adds a value to this set.
Returns whether a value is in this set.
Removes a value to this set.
Total number of elements in this set
Current element for iteration
Current key for iteration
Move internal iterator forward
Check whether a current value exists
Rewind internal iterator
Details
__construct(Type $type)
Creates a new collection of a given type.
Type
type()
The type of this set.
array
values()
Array of values in this set.
bool
add(mixed $value)
Adds a value to this set.
bool
has(mixed $value)
Returns whether a value is in this set.
bool
remove(mixed $value)
Removes a value to this set.
int<0, max>
count()
Total number of elements in this set
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