ArrayCollection
extends ArrayCollection
in package
implements
CollectionInterface
General JSON serializable collection.
Tags
Table of Contents
Interfaces
- CollectionInterface
- Collection Interface.
Methods
- chunk() : array<string|int, mixed>
- Split collection into chunks.
- jsonSerialize() : array<string|int, mixed>
- Implements JsonSerializable interface.
- reverse() : static
- Reverse the order of the items.
- select() : static
- Select items from collection.
- shuffle() : static
- Shuffle items.
- unselect() : static
- 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>jsonSerialize()
Implements JsonSerializable interface.
public
jsonSerialize() : array<string|int, mixed>
Attributes
- #[ReturnTypeWillChange]
Return values
array<string|int, mixed>reverse()
Reverse the order of the items.
public
reverse() : static
Tags
Return values
staticselect()
Select items from collection.
public
select(array<int, string> $keys) : static
Collection is returned in the order of $keys given to the function.
Parameters
- $keys : array<int, string>
Tags
Return values
staticshuffle()
Shuffle items.
public
shuffle() : static
Tags
Return values
staticunselect()
Un-select items from collection.
public
unselect(array<string|int, int|string> $keys) : static
Parameters
- $keys : array<string|int, int|string>