A PHP representation of the CQL set datatype

Implements

Methods

__construct

( Dse\Type $type )

Creates a new collection of a given type.

Parameters:
Name Type Details
$type Dse\Type
Dse\Type

type

( )

The type of this set.

Returns:
Type Details
Dse\Type
array

values

( )

Array of values in this set.

Returns:
Type Details
array

values

bool

add

( mixed $value )

Adds a value to this set.

Parameters:
Name Type Details
$value mixed

Dse\Value

Returns:
Type Details
bool

whether the value has been added

bool

has

( mixed $value )

Returns whether a value is in this set.

Parameters:
Name Type Details
$value mixed

Dse\Value

Returns:
Type Details
bool

whether the value is in the set

bool

remove

( mixed $value )

Removes a value to this set.

Parameters:
Name Type Details
$value mixed

Dse\Value

Returns:
Type Details
bool

whether the value has been removed

int

count

( )

Total number of elements in this set

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