A class that represents the list type. The list type contains the type of the elements contain in the list.

Extends

Methods

string

name

( )

Returns “list”

Returns:
Type Details
string

“list”

Cassandra\Type

valueType

( )

Returns type of values

Returns:
Type Details
Cassandra\Type

Cassandra\Type of values

string

__toString

( )

Returns type representation in CQL, e.g. list<varchar>

Returns:
Type Details
string

Cassandra\Type representation in CQL

Type\Collection

create

( mixed $value )

Creates a new Type\Collection from the given values. When no values given, creates an empty list.

Parameters:
Name Type Details
$value mixed

One or more values to be added to the list.

Throws:
Type Details
Exception\InvalidArgumentException

when values given are of a different type than what this list type expects.

Returns:
Type Details
Type\Collection

A list with given values.