interface CollectionInterface (Voir la source)

Méthodes

bool
has(string|int $key)

Check for existence of a key in the session collection

bool
isEmpty()

Check if a collection is empty.

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

Allows to recover a value or value collection.

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

Add an entry to the collection

mixed
remove(string|int $key)

Delete an entry in the collection

mixed
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|int $key)

Check for existence of a key in the session collection

Paramètres

string|int $key

Valeur de retour

bool

bool isEmpty()

Check if a collection is empty.

Valeur de retour

bool

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

Allows to recover a value or value collection.

Paramètres

mixed $key
mixed $default

Valeur de retour

mixed

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

Add an entry to the collection

Paramètres

string|int $key
mixed $data
bool $next

Valeur de retour

mixed

mixed remove(string|int $key)

Delete an entry in the collection

Paramètres

string|int $key

Valeur de retour

mixed

mixed set(string $key, mixed $value)

Modify an entry in the collection

Paramètres

string $key
mixed $value

Valeur de retour

mixed

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