PHP Class Cassandra\Collection

Inheritance: implements Countable, implements Iterator
Afficher le fichier Open project: datastax/php-driver

Méthodes publiques

Méthode Description
__construct ( cassandra\Type $type ) Creates a new collection of a given type.
add ( $value ) : integer Adds one or more values to this collection.
count ( ) : integer Total number of elements in this collection
current ( ) : mixed Current element for iteration
find ( mixed $value ) : integer Finds index of a value in this collection.
get ( integer $index ) : mixed Retrieves the value at a given index.
key ( ) : integer Current key for iteration
next ( ) : void Move internal iterator forward
remove ( integer $index ) : boolean Deletes the value at a given index
rewind ( ) : void Rewind internal iterator
type ( ) : cassandra\Type The type of this collection.
valid ( ) : boolean Check whether a current value exists
values ( ) : array Array of values in this collection.

Method Details

__construct() public méthode

Creates a new collection of a given type.
public __construct ( cassandra\Type $type )
$type cassandra\Type

add() public méthode

Adds one or more values to this collection.
public add ( $value ) : integer
Résultat integer total number of values in this collection

count() public méthode

Total number of elements in this collection
public count ( ) : integer
Résultat integer count

current() public méthode

Current element for iteration
public current ( ) : mixed
Résultat mixed current element

find() public méthode

Finds index of a value in this collection.
public find ( mixed $value ) : integer
$value mixed Value
Résultat integer Index or null

get() public méthode

Retrieves the value at a given index.
public get ( integer $index ) : mixed
$index integer Index
Résultat mixed Value or null

key() public méthode

Current key for iteration
public key ( ) : integer
Résultat integer current key

next() public méthode

Move internal iterator forward
public next ( ) : void
Résultat void

remove() public méthode

Deletes the value at a given index
public remove ( integer $index ) : boolean
$index integer Index
Résultat boolean Whether the value at a given index is correctly removed

rewind() public méthode

Rewind internal iterator
public rewind ( ) : void
Résultat void

type() public méthode

The type of this collection.
public type ( ) : cassandra\Type
Résultat cassandra\Type

valid() public méthode

Check whether a current value exists
public valid ( ) : boolean
Résultat boolean

values() public méthode

Array of values in this collection.
public values ( ) : array
Résultat array values