Collection
class Collection extends Collection (View source)
Properties
protected array | $storage | The collection store |
from Collection |
Methods
No description
Get the first item of starage
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 $storage = [])
No description
mixed
first()
Get the first item of starage
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(mixed $key, mixed $value)
Modify an entry in the collection or the addition if not
void
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
mixed
fill(mixed $data, int $offset)
Fill storage
Collection
reduce(callable $cb, mixed $next = null)
Reduce
string
implode(string $sep)
Implode
int|float
sum(callable $cb = null)
Sum
int|float
max(callable|null $cb = null)
Max
int|float
min(callable|null $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(mixed $key, mixed $data, bool $override = false)
Update an existing value in the collection
Generator
yieldify()
Launches the collection content as 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
array
all()
Returns the elements of the collection
Collection
push(mixed $value, mixed $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