class Map
A class that represents the map type. The map type contains two types that represents the types of the key and value contained in the map.
Extends
Methods
string
name
( )Returns “map”
Cassandra\Type
keyType
( )Returns type of keys
Cassandra\Type
valueType
( )Returns type of values
string
__toString
( )Returns type representation in CQL, e.g. map<varchar, int>
Creates a new Type\Map
from the given values.
<?php
use Type;
use Uuid;
$type = Type::map(Type::uuid(), Type::varchar());
$map = $type->create(new Uuid(), 'first uuid',
new Uuid(), 'second uuid',
new Uuid(), 'third uuid');
var_dump($map);
is a key and each even value is a value for the
map, e.g. create(key, value, key, value)
.
When no values given, creates an empty map.