final class UserTypeValue implements Value, Countable, Iterator (View source)

A PHP representation of the CQL UDT datatype

Methods

__construct(array $types)

Creates a new user type value with the given name/type pairs.

type()

The type of this user type value.

array
values()

Array of values in this user type value.

void
set(mixed $value)

Sets the value at name in this user type value.

mixed
get(string $name)

Retrieves the value at a given name.

int
count()

Total number of elements in this user type value.

mixed
current()

Current element for iteration

mixed
key()

Current key for iteration

void
next()

Move internal iterator forward

bool
valid()

Check whether a current value exists

void
rewind()

Rewind internal iterator

Details

__construct(array $types)

Creates a new user type value with the given name/type pairs.

Parameters

array $types

Array of types

Type type()

The type of this user type value.

Return Value

Type

array values()

Array of values in this user type value.

Return Value

array values

void set(mixed $value)

Sets the value at name in this user type value.

Parameters

mixed $value

A value or null

Return Value

void

mixed get(string $name)

Retrieves the value at a given name.

Parameters

string $name

String of the field name

Return Value

mixed

A value or null

int count()

Total number of elements in this user type value.

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

mixed current()

Current element for iteration

Return Value

mixed

Can return any type.

mixed key()

Current key for iteration

Return Value

mixed

TKey on success, or null on failure.

void next()

Move internal iterator forward

Return Value

void

Any returned value is ignored.

bool valid()

Check whether a current value exists

Return Value

bool

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

void rewind()

Rewind internal iterator

Return Value

void

Any returned value is ignored.