A PHP representation of the CQL tuple datatype

Implements

Methods

__construct

( array $types )

Creates a new tuple with the given types.

Parameters:
Name Type Details
$types array

Array of types

Cassandra\Type

type

( )

The type of this tuple.

Returns:
Type Details
Cassandra\Type
array

values

( )

Array of values in this tuple.

Returns:
Type Details
array

values

void

set

( mixed $value )

Sets the value at index in this tuple .

Parameters:
Name Type Details
$value mixed

A value or null

Returns:
Type Details
void
mixed

get

( int $index )

Retrieves the value at a given index.

Parameters:
Name Type Details
$index int

Cassandra\Index

Returns:
Type Details
mixed

A value or null

int

count

( )

Total number of elements in this tuple

Returns:
Type Details
int

count

mixed

current

( )

Current element for iteration

Returns:
Type Details
mixed

current element

int

key

( )

Current key for iteration

Returns:
Type Details
int

current key

void

next

( )

Move internal iterator forward

Returns:
Type Details
void
bool

valid

( )

Check whether a current value exists

Returns:
Type Details
bool
void

rewind

( )

Rewind internal iterator

Returns:
Type Details
void