interface CollectionInterface (Voir la source)

Méthodes

bool
has(string $key)

Check for existence of a key in the session collection

bool
isEmpty()

Check if a collection is empty.

mixed
get(string $key, mixed $default = null)

Allows to recover a value or value collection.

add(string $key, $data, bool $next = false)

Add an entry to the collection

remove(string $key)

Delete an entry in the collection

set(string $key, mixed $value)

Modify an entry in the collection

array
toArray()

Return all the entries of the collection as an array

array
toObject()

Return all entries of the collection as an object

Détails

bool has(string $key)

Check for existence of a key in the session collection

Paramètres

string $key

Valeur de retour

bool

bool isEmpty()

Check if a collection is empty.

Valeur de retour

bool

mixed get(string $key, mixed $default = null)

Allows to recover a value or value collection.

Paramètres

string $key
mixed $default

Valeur de retour

mixed

CollectionInterface add(string $key, $data, bool $next = false)

Add an entry to the collection

Paramètres

string $key
$data
bool $next

Valeur de retour

CollectionInterface

CollectionInterface remove(string $key)

Delete an entry in the collection

Paramètres

string $key

Valeur de retour

CollectionInterface

CollectionInterface set(string $key, mixed $value)

Modify an entry in the collection

Paramètres

string $key
mixed $value

Valeur de retour

CollectionInterface

array toArray()

Return all the entries of the collection as an array

Valeur de retour

array

array toObject()

Return all entries of the collection as an object

Valeur de retour

array