interface CollectionInterface

Collection interface

Methods

void
clear()

Delete all collection items

Collection
copy()

Copy collection

bool
isEmpty(string $key)

Return true if collection item is empty

array
toArray()

Convert collection to array

mixed
get(string $key, mixed $default = null)

Get value from collection

mixed
getByPath(string $path, mixed $default = null)

Get value by path

Collection
set(string $key, mixed $value)

Set item value in collection

Details

at line 22
void clear()

Delete all collection items

Return Value

void

at line 29
Collection copy()

Copy collection

Return Value

Collection

at line 37
bool isEmpty(string $key)

Return true if collection item is empty

Parameters

string $key

Return Value

bool

at line 44
array toArray()

Convert collection to array

Return Value

array

at line 53
mixed get(string $key, mixed $default = null)

Get value from collection

Parameters

string $key Name
mixed $default If key not exists return default value

Return Value

mixed

at line 62
mixed getByPath(string $path, mixed $default = null)

Get value by path

Parameters

string $path
mixed $default

Return Value

mixed

at line 71
Collection set(string $key, mixed $value)

Set item value in collection

Parameters

string $key Key Name
mixed $value Value

Return Value

Collection