Snaju Inception Docs

Collection
in package

Table of Contents

$allowOverwite  : bool
$caseSensitive  : bool
$name  : string|null
$readOnly  : bool
$throwOverwriteExceptions  : bool
$items  : array<string|int, mixed>
__construct()  : mixed
add()  : Collection
addFromArray()  : Collection
get()  : mixed
getOrSet()  : array<string|int, mixed>
keyExists()  : bool
Returns true if a item with the specified key exists.
keys()  : array<string|int, mixed>
length()  : int
remove()  : Collection
toArray()  : array<string|int, mixed>

Properties

$allowOverwite

public bool $allowOverwite = false

$caseSensitive

public bool $caseSensitive = false

$throwOverwriteExceptions

public bool $throwOverwriteExceptions = false

$items

private array<string|int, mixed> $items = []

Methods

__construct()

public __construct([array<string|int, mixed> $data = [] ][, string|null $name = null ][, bool $overwrite = false ][, bool $readOnly = false ][, bool $throwOverwriteExceptions = false ][, bool $caseSensitive = false ]) : mixed
Parameters
$data : array<string|int, mixed> = []
$name : string|null = null
$overwrite : bool = false
$readOnly : bool = false
$throwOverwriteExceptions : bool = false
$caseSensitive : bool = false
Return values
mixed

addFromArray()

public addFromArray(array<string|int, mixed> $array) : Collection
Parameters
$array : array<string|int, mixed>
Return values
Collection

get()

public get(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

getOrSet()

public getOrSet(mixed $key, mixed $value) : array<string|int, mixed>
Parameters
$key : mixed
$value : mixed
Return values
array<string|int, mixed>

keyExists()

Returns true if a item with the specified key exists.

public keyExists( $key) : bool
Parameters
$key :
Return values
bool

keys()

public keys() : array<string|int, mixed>
Return values
array<string|int, mixed>

length()

public length() : int
Return values
int

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results