PHP Class Cassandra\Tuple

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

Public Methods

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

Method Details

__construct() public method

Creates a new tuple with the given types.
public __construct ( array $types )
$types array Array of types

count() public method

Total number of elements in this tuple
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 index.
public get ( integer $index ) : mixed
$index integer Index
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 index in this tuple .
public set ( integer $index, mixed $value ) : void
$index integer Index
$value mixed Value or null
return void

type() public method

The type of this tuple.
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 tuple.
public values ( ) : array
return array values