CollectionInterface
interface CollectionInterface (View source)
Methods
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
Details
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