Skip to content

ArrayCollection

Properties

container

protected array $container

Methods

__construct

public __construct(array $elements = []): mixed

Parameters:

Parameter Type Description
$elements array

toArray

public toArray(): array

jsonSerialize

public jsonSerialize(): array

offsetExists

public offsetExists(string $offset): bool

Parameters:

Parameter Type Description
$offset string

offsetGet

public offsetGet(string $offset): mixed

Parameters:

Parameter Type Description
$offset string

offsetSet

public offsetSet(mixed $offset, mixed $value): void

Parameters:

Parameter Type Description
$offset mixed
$value mixed

offsetUnset

public offsetUnset(string $offset): void

Parameters:

Parameter Type Description
$offset string

count

public count(): int

getIterator

public getIterator(): \ArrayIterator

get

public get(mixed $key, mixed|null $default = null): null|mixed

Parameters:

Parameter Type Description
$key mixed
$default mixed|null

set

public set(string $key, mixed $value): void

Parameters:

Parameter Type Description
$key string
$value mixed

add

public add(mixed $value): bool

Parameters:

Parameter Type Description
$value mixed

remove

public remove(string $key): null|mixed

Parameters:

Parameter Type Description
$key string

removeAll

public removeAll(): void


Automatically generated on 2025-10-13