Collection
class Collection extends Collection (View source)
Properties
protected array | $storage | The collection store |
from Collection |
Methods
No description
Check existence of a key in the session collection
Allows to recover a value or value collection.
To retrieve a value or value collection form d'instance de collection.
Modify an entry in the collection or the addition if not
Returns the key list and return an instance of Collection.
Ignore the key that is given to it and return an instance of Collection.
Update an existing value in the collection
No description
No description
Add after the last item in the collection
No description
No description
Allows you to delete all the selected recordings
Details
__construct(array $arr = [])
No description
mixed
first()
The first element of the list
array
last()
The last element of the list
bool
has(string $key, bool $strict = false)
Check existence of a key in the session collection
bool
isEmpty()
Check if a collection is empty.
mixed
get(string $key = null, mixed $default = null)
Allows to recover a value or value collection.
Collection
values()
Get the list of values of collection
Collection
keys()
Get the list of keys of collection
int
count()
Count the collection element.
Collection
collectionify(string $key)
To retrieve a value or value collection form d'instance de collection.
Collection
delete(string $key)
Delete an entry in the collection
mixed
set(string $key, mixed $value)
Modify an entry in the collection or the addition if not
each(callable $cb)
Browse all the values of the collection
Collection
merge(Collection|array $array)
Merge the collection with a painting or other collection
Collection
map(callable $cb)
Map
Collection
filter(callable $cb)
Filter
array
fill(mixed $data, int $offset)
Fill storage
Collection
reduce(callable $cb, mixed $next = null)
Reduce
string
implode($sep)
Implode
int
sum(callable $cb = null)
Sum
number
max(callable $cb = null)
Max
number
min(callable $cb = null)
Max
Collection
excepts(array $except)
Returns the key list and return an instance of Collection.
Collection
ignores(array $ignores)
Ignore the key that is given to it and return an instance of Collection.
Collection
reverse()
Reverse collection
bool
update(string|int $key, mixed $data, bool $override = false)
Update an existing value in the collection
Generator
yieldify()
Launches a generator
string
toJson(int $option = 0)
No description
int
length()
Length of the collection
mixed
shift()
Deletes the first item in the collection
mixed
pop()
Deletes the last item in the collection
array
toArray()
No description
mixed
all()
Returns the elements of the collection
mixed
push(mixed $value, int|string $key = null)
Add after the last item in the collection
mixed
__get(mixed $name)
__get
void
__set(mixed $name, mixed $value)
__set
bool
__isset(mixed $name)
__isset
void
__unset(mixed $name)
__unset
string
__toString()
No description
string
jsonSerialize()
No description
ArrayIterator
getIterator()
getIterator
bool
offsetExists(mixed $offset)
offsetExists
mixed
offsetGet(mixed $offset)
offsetGet
void
offsetSet(mixed $offset, mixed $value)
offsetSet
void
offsetUnset(mixed $offset)
offsetUnset
void
dropAll()
Allows you to delete all the selected recordings