PHP 클래스 Cassandra\Map

상속: implements Countable, implements Iterator, implements ArrayAccess
파일 보기 프로젝트 열기: datastax/php-driver 1 사용 예제들

공개 메소드들

메소드 설명
__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