Documentation

ArrayCollection extends ArrayCollection implements CollectionInterface

General JSON serializable collection.

Tags
template
template
extends
implements

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
phpstan-return

array<array<TKey,T>>

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
phpstan-return

static<TKey,T>

Return values
static

select()

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
phpstan-param

TKey[] $keys

phpstan-return

static<TKey,T>

Return values
static

shuffle()

Shuffle items.

public shuffle() : static
Tags
phpstan-return

static<TKey,T>

Return values
static

unselect()

Un-select items from collection.

public unselect(array<string|int, int|string> $keys) : static
Parameters
$keys : array<string|int, int|string>
Tags
phpstan-param

TKey[] $keys

phpstan-return

static<TKey,T>

Return values
static

        
On this page

Search results