PHP Class Cassandra\Map

Inheritance: implements Countable, implements Iterator, implements ArrayAccess
Afficher le fichier Open project: datastax/php-driver Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( cassandra\Type $keyType, cassandra\Type $valueType ) Creates a new map of a given key and value type.
count ( ) : integer Total number of elements in this map
current ( ) : mixed Current value for iteration
get ( mixed $key ) : mixed Gets the value of the key in the map.
has ( mixed $key ) : boolean Returns whether the key is in the map.
key ( ) : integer Current key for iteration
keys ( ) : array Returns all keys in the map as an array.
next ( ) : void Move internal iterator forward
offsetExists ( mixed $key ) : boolean Returns whether the value a given key is present
offsetGet ( mixed $key ) : mixed Retrieves the value at a given key
offsetSet ( mixed $key, mixed $value ) : void Sets the value at a given key
offsetUnset ( mixed $key ) : void Deletes the value at a given key
remove ( mixed $key ) : boolean Removes the key from the map.
rewind ( ) : void Rewind internal iterator
set ( mixed $key, mixed $value ) Sets key/value in the map.
type ( ) : cassandra\Type The type of this map.
valid ( ) : boolean Check whether a current value exists
values ( ) : array Returns all values in the map as an array.

Method Details

__construct() public méthode

Creates a new map of a given key and value type.
public __construct ( cassandra\Type $keyType, cassandra\Type $valueType )
$keyType cassandra\Type
$valueType cassandra\Type

count() public méthode

Total number of elements in this map
public count ( ) : integer
Résultat integer count

current() public méthode

Current value for iteration
public current ( ) : mixed
Résultat mixed current value

get() public méthode

Gets the value of the key in the map.
public get ( mixed $key ) : mixed
$key mixed Key
Résultat mixed Value or null

has() public méthode

Returns whether the key is in the map.
public has ( mixed $key ) : boolean
$key mixed Key
Résultat boolean Whether the key is in the map or not

key() public méthode

Current key for iteration
public key ( ) : integer
Résultat integer current key

keys() public méthode

Returns all keys in the map as an array.
public keys ( ) : array
Résultat array keys

next() public méthode

Move internal iterator forward
public next ( ) : void
Résultat void

offsetExists() public méthode

Returns whether the value a given key is present
public offsetExists ( mixed $key ) : boolean
$key mixed Key to use.
Résultat boolean Whether the value at a given key is present

offsetGet() public méthode

Retrieves the value at a given key
public offsetGet ( mixed $key ) : mixed
$key mixed Key to use.
Résultat mixed Value or `null`

offsetSet() public méthode

Sets the value at a given key
public offsetSet ( mixed $key, mixed $value ) : void
$key mixed Key to use.
$value mixed Value to set.
Résultat void

offsetUnset() public méthode

Deletes the value at a given key
public offsetUnset ( mixed $key ) : void
$key mixed Key to use.
Résultat void

remove() public méthode

Removes the key from the map.
public remove ( mixed $key ) : boolean
$key mixed Key
Résultat boolean Whether the key was removed or not, e.g. didn't exist

rewind() public méthode

Rewind internal iterator
public rewind ( ) : void
Résultat void

set() public méthode

Sets key/value in the map.
public set ( mixed $key, mixed $value )
$key mixed key
$value mixed value

type() public méthode

The type of this map.
public type ( ) : cassandra\Type
Résultat cassandra\Type

valid() public méthode

Check whether a current value exists
public valid ( ) : boolean
Résultat boolean

values() public méthode

Returns all values in the map as an array.
public values ( ) : array
Résultat array values