PHP Класс Cassandra\Map

Наследование: implements Countable, implements Iterator, implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный метод

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() публичный метод

Total number of elements in this map
public count ( ) : integer
Результат integer count

current() публичный метод

Current value for iteration
public current ( ) : mixed
Результат mixed current value

get() публичный метод

Gets the value of the key in the map.
public get ( mixed $key ) : mixed
$key mixed Key
Результат mixed Value or null

has() публичный метод

Returns whether the key is in the map.
public has ( mixed $key ) : boolean
$key mixed Key
Результат boolean Whether the key is in the map or not

key() публичный метод

Current key for iteration
public key ( ) : integer
Результат integer current key

keys() публичный метод

Returns all keys in the map as an array.
public keys ( ) : array
Результат array keys

next() публичный метод

Move internal iterator forward
public next ( ) : void
Результат void

offsetExists() публичный метод

Returns whether the value a given key is present
public offsetExists ( mixed $key ) : boolean
$key mixed Key to use.
Результат boolean Whether the value at a given key is present

offsetGet() публичный метод

Retrieves the value at a given key
public offsetGet ( mixed $key ) : mixed
$key mixed Key to use.
Результат mixed Value or `null`

offsetSet() публичный метод

Sets the value at a given key
public offsetSet ( mixed $key, mixed $value ) : void
$key mixed Key to use.
$value mixed Value to set.
Результат void

offsetUnset() публичный метод

Deletes the value at a given key
public offsetUnset ( mixed $key ) : void
$key mixed Key to use.
Результат void

remove() публичный метод

Removes the key from the map.
public remove ( mixed $key ) : boolean
$key mixed Key
Результат boolean Whether the key was removed or not, e.g. didn't exist

rewind() публичный метод

Rewind internal iterator
public rewind ( ) : void
Результат void

set() публичный метод

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

type() публичный метод

The type of this map.
public type ( ) : cassandra\Type
Результат cassandra\Type

valid() публичный метод

Check whether a current value exists
public valid ( ) : boolean
Результат boolean

values() публичный метод

Returns all values in the map as an array.
public values ( ) : array
Результат array values