PHP Class Cassandra\UserTypeValue

Inheritance: implements cassandra\Value, implements Countable, implements Iterator
Show file Open project: datastax/php-driver

Public Methods

Method Description
__construct ( array $types ) Creates a new user type value with the given name/type pairs.
count ( ) : integer Total number of elements in this user type value.
current ( ) : mixed Current element for iteration
get ( sting $name ) : mixed Retrieves the value at a given name.
key ( ) : integer Current key for iteration
next ( ) : void Move internal iterator forward
rewind ( ) : void Rewind internal iterator
set ( sting $name, mixed $value ) : void Sets the value at name in this user type value.
type ( ) : cassandra\Type The type of this user type value.
valid ( ) : boolean Check whether a current value exists
values ( ) : array Array of values in this user type value.

Method Details

__construct() public method

Creates a new user type value with the given name/type pairs.
public __construct ( array $types )
$types array Array of types

count() public method

Total number of elements in this user type value.
public count ( ) : integer
return integer count

current() public method

Current element for iteration
public current ( ) : mixed
return mixed current element

get() public method

Retrieves the value at a given name.
public get ( sting $name ) : mixed
$name sting String of the field name
return mixed Value or null

key() public method

Current key for iteration
public key ( ) : integer
return integer current key

next() public method

Move internal iterator forward
public next ( ) : void
return void

rewind() public method

Rewind internal iterator
public rewind ( ) : void
return void

set() public method

Sets the value at name in this user type value.
public set ( sting $name, mixed $value ) : void
$name sting String of the field name
$value mixed Value or null
return void

type() public method

The type of this user type value.
public type ( ) : cassandra\Type
return cassandra\Type

valid() public method

Check whether a current value exists
public valid ( ) : boolean
return boolean

values() public method

Array of values in this user type value.
public values ( ) : array
return array values