Map
final class Map implements Value, Countable, Iterator, ArrayAccess (View source)
A PHP representation of the CQL map
datatype
Methods
Returns all keys in the map as an array.
Returns all values in the map as an array.
Sets key/value in the map.
Gets the value of the key in the map.
Removes the key from the map.
Returns whether the key is in the map.
Total number of elements in this map
Current value for iteration
Current key for iteration
Move internal iterator forward
Check whether a current value exists
Rewind internal iterator
Sets the value at a given key
Retrieves the value at a given key
Deletes the value at a given key
Returns whether the value a given key is present
Details
Type
type()
The type of this map.
array
keys()
Returns all keys in the map as an array.
array
values()
Returns all values in the map as an array.
mixed
set(mixed $key, mixed $value)
Sets key/value in the map.
mixed
get(mixed $key)
Gets the value of the key in the map.
bool
remove(mixed $key)
Removes the key from the map.
bool
has(mixed $key)
Returns whether the key is in the map.
int
count()
Total number of elements in this map
mixed
current()
Current value for iteration
mixed
key()
Current key for iteration
void
next()
Move internal iterator forward
bool
valid()
Check whether a current value exists
void
rewind()
Rewind internal iterator
void
offsetSet(mixed $key, TValue $value)
Sets the value at a given key
mixed
offsetGet(mixed $key)
Retrieves the value at a given key
void
offsetUnset(mixed $key)
Deletes the value at a given key
bool
offsetExists(mixed $key)
Returns whether the value a given key is present