classe Collection étends Collection (Voir la source)

Propriétés

protected array $storage

The collection store

depuis  Collection

Méthodes

__construct(array $arr = [])

Pas de description

mixed
first()

The first element of the list

depuis  Collection
array
last()

The last element of the list

depuis  Collection
bool
has(string $key, bool $strict = false)

Check existence of a key in the session collection

depuis  Collection
bool
isEmpty()

Check if a collection is empty.

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

Allows to recover a value or value collection.

depuis  Collection
values()

Get the list of values of collection

depuis  Collection
keys()

Get the list of keys of collection

depuis  Collection
int
count()

Count the collection element.

depuis  Collection
collectionify(string $key)

To retrieve a value or value collection form d'instance de collection.

depuis  Collection
delete(string $key)

Delete an entry in the collection

depuis  Collection
mixed
set(string $key, mixed $value)

Modify an entry in the collection or the addition if not

depuis  Collection
each(callable $cb)

Browse all the values of the collection

depuis  Collection
merge(Collection|array $array)

Merge the collection with a painting or other collection

depuis  Collection
map(callable $cb)

Map

depuis  Collection
filter(callable $cb)

Filter

depuis  Collection
array
fill(mixed $data, int $offset)

Fill storage

depuis  Collection
reduce(callable $cb, mixed $next = null)

Reduce

depuis  Collection
string
implode($sep)

Implode

depuis  Collection
int
sum(callable $cb = null)

Sum

depuis  Collection
number
max(callable $cb = null)

Max

depuis  Collection
number
min(callable $cb = null)

Max

depuis  Collection
excepts(array $except)

Returns the key list and return an instance of Collection.

depuis  Collection
ignores(array $ignores)

Ignore the key that is given to it and return an instance of Collection.

depuis  Collection
reverse()

Reverse collection

depuis  Collection
bool
update(string|int $key, mixed $data, bool $override = false)

Update an existing value in the collection

depuis  Collection
yieldify()

Launches a generator

depuis  Collection
string
toJson(int $option = 0)

Pas de description

int
length()

Length of the collection

depuis  Collection
mixed
shift()

Deletes the first item in the collection

depuis  Collection
mixed
pop()

Deletes the last item in the collection

depuis  Collection
array
toArray()

Pas de description

mixed
all()

Returns the elements of the collection

depuis  Collection
mixed
push(mixed $value, int|string $key = null)

Add after the last item in the collection

depuis  Collection
mixed
__get(mixed $name)

__get

depuis  Collection
void
__set(mixed $name, mixed $value)

__set

depuis  Collection
bool
__isset(mixed $name)

__isset

depuis  Collection
void
__unset(mixed $name)

__unset

depuis  Collection
string
__toString()

Pas de description

string
jsonSerialize()

Pas de description

getIterator()

getIterator

depuis  Collection
bool
offsetExists(mixed $offset)

offsetExists

depuis  Collection
mixed
offsetGet(mixed $offset)

offsetGet

depuis  Collection
void
offsetSet(mixed $offset, mixed $value)

offsetSet

depuis  Collection
void
offsetUnset(mixed $offset)

offsetUnset

depuis  Collection
void
dropAll()

Allows you to delete all the selected recordings

Détails

__construct(array $arr = [])

Pas de description

Paramètres

array $arr

mixed first()

The first element of the list

Valeur de retour

mixed

array last()

The last element of the list

Valeur de retour

array

bool has(string $key, bool $strict = false)

Check existence of a key in the session collection

Paramètres

string $key
bool $strict

Valeur de retour

bool

bool isEmpty()

Check if a collection is empty.

Valeur de retour

bool

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

Allows to recover a value or value collection.

Paramètres

string $key
mixed $default

Valeur de retour

mixed

Collection values()

Get the list of values of collection

Valeur de retour

Collection

Collection keys()

Get the list of keys of collection

Valeur de retour

Collection

int count()

Count the collection element.

Valeur de retour

int

Collection collectionify(string $key)

To retrieve a value or value collection form d'instance de collection.

Paramètres

string $key

Valeur de retour

Collection

Collection delete(string $key)

Delete an entry in the collection

Paramètres

string $key

Valeur de retour

Collection

mixed set(string $key, mixed $value)

Modify an entry in the collection or the addition if not

Paramètres

string $key
mixed $value

Valeur de retour

mixed

each(callable $cb)

Browse all the values of the collection

Paramètres

callable $cb

Collection merge(Collection|array $array)

Merge the collection with a painting or other collection

Paramètres

Collection|array $array

Valeur de retour

Collection

Exceptions

ErrorException

Collection map(callable $cb)

Map

Paramètres

callable $cb

Valeur de retour

Collection

Collection filter(callable $cb)

Filter

Paramètres

callable $cb

Valeur de retour

Collection

array fill(mixed $data, int $offset)

Fill storage

Paramètres

mixed $data
int $offset

Valeur de retour

array

Collection reduce(callable $cb, mixed $next = null)

Reduce

Paramètres

callable $cb
mixed $next

Valeur de retour

Collection

string implode($sep)

Implode

Paramètres

$sep

Valeur de retour

string

int sum(callable $cb = null)

Sum

Paramètres

callable $cb

Valeur de retour

int

number max(callable $cb = null)

Max

Paramètres

callable $cb

Valeur de retour

number

number min(callable $cb = null)

Max

Paramètres

callable $cb

Valeur de retour

number

Collection excepts(array $except)

Returns the key list and return an instance of Collection.

Paramètres

array $except

Valeur de retour

Collection

Collection ignores(array $ignores)

Ignore the key that is given to it and return an instance of Collection.

Paramètres

array $ignores

Valeur de retour

Collection

Collection reverse()

Reverse collection

Valeur de retour

Collection

bool update(string|int $key, mixed $data, bool $override = false)

Update an existing value in the collection

Paramètres

string|int $key
mixed $data
bool $override

Valeur de retour

bool

Generator yieldify()

Launches a generator

Valeur de retour

Generator

string toJson(int $option = 0)

Pas de description

Paramètres

int $option

Valeur de retour

string

int length()

Length of the collection

Valeur de retour

int

mixed shift()

Deletes the first item in the collection

Valeur de retour

mixed

mixed pop()

Deletes the last item in the collection

Valeur de retour

mixed

array toArray()

Pas de description

Valeur de retour

array

mixed all()

Returns the elements of the collection

Valeur de retour

mixed

mixed push(mixed $value, int|string $key = null)

Add after the last item in the collection

Paramètres

mixed $value
int|string $key

Valeur de retour

mixed

mixed __get(mixed $name)

__get

Paramètres

mixed $name

Valeur de retour

mixed

void __set(mixed $name, mixed $value)

__set

Paramètres

mixed $name
mixed $value

Valeur de retour

void

bool __isset(mixed $name)

__isset

Paramètres

mixed $name

Valeur de retour

bool

void __unset(mixed $name)

__unset

Paramètres

mixed $name

Valeur de retour

void

string __toString()

Pas de description

Valeur de retour

string

string jsonSerialize()

Pas de description

Valeur de retour

string

ArrayIterator getIterator()

getIterator

Valeur de retour

ArrayIterator

bool offsetExists(mixed $offset)

offsetExists

Paramètres

mixed $offset

Valeur de retour

bool

mixed offsetGet(mixed $offset)

offsetGet

Paramètres

mixed $offset

Valeur de retour

mixed

void offsetSet(mixed $offset, mixed $value)

offsetSet

Paramètres

mixed $offset
mixed $value

Valeur de retour

void

void offsetUnset(mixed $offset)

offsetUnset

Paramètres

mixed $offset

Valeur de retour

void

void dropAll()

Allows you to delete all the selected recordings

Valeur de retour

void