CollectionInterface
extends
Collection, JsonSerializable
in
Collection Interface.
Tags
Table of Contents
Methods
- chunk() : array<string|int, mixed>
- Split collection into chunks.
- reverse() : CollectionInterface
- Reverse the order of the items.
- select() : CollectionInterface
- Select items from collection.
- shuffle() : CollectionInterface
- Shuffle items.
- unselect() : CollectionInterface
- Un-select items from collection.
Methods
chunk()
Split collection into chunks.
public
chunk(int $size) : array<string|int, mixed>
Parameters
- $size : int
-
Size of each chunk.
Tags
Return values
array<string|int, mixed>reverse()
Reverse the order of the items.
public
reverse() : CollectionInterface
Tags
Return values
CollectionInterfaceselect()
Select items from collection.
public
select(array<string|int, int|string> $keys) : CollectionInterface
Collection is returned in the order of $keys given to the function.
Parameters
- $keys : array<string|int, int|string>
Tags
Return values
CollectionInterfaceshuffle()
Shuffle items.
public
shuffle() : CollectionInterface
Tags
Return values
CollectionInterfaceunselect()
Un-select items from collection.
public
unselect(array<string|int, int|string> $keys) : CollectionInterface
Parameters
- $keys : array<string|int, int|string>