Collection extends Dictionary
Class Collection
Table of Contents
Methods
- __construct() : mixed
- Constructor Collection.
- __unserialize() : void
- add() : void
- Add an array of channel instances to the collection.
- addChannel() : void
- Add channel to the collection.
- clear() : mixed
- get() : string|array<string|int, mixed>|null
- Returns any variable by its name. Null if variable is not set.
- getSourceId() : int|null
- Get source ID.
- getValues() : array<string|int, mixed>
- isEmpty() : bool
- Returns true if the dictionary is empty.
- jsonSerialize() : array<string|int, mixed>
- JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON
- offsetSet() : void
- \ArrayAccess thing.
- set() : mixed
- setChannel() : void
- Add an complex identificator to the collection.
- setValues() : mixed
- toArray() : array<string|int, Base>
- Convert to array.
- toSimpleArray() : array<string|int, mixed>
- Convert to array of identificators.
Methods
__construct()
Constructor Collection.
public
__construct([array<string|int, Base> $values = null ]) : mixed
Parameters
- $values : array<string|int, Base> = null
-
Initial channels in the collection.
__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
add()
Add an array of channel instances to the collection.
public
add(array<string|int, Base> $items) : void
Parameters
- $items : array<string|int, Base>
-
Channel instance.
addChannel()
Add channel to the collection.
public
addChannel(string $code, string $value) : void
Parameters
- $code : string
-
Code.
- $value : string
-
Value.
clear()
public
clear() : mixed
get()
Returns any variable by its name. Null if variable is not set.
public
get(string $name) : string|array<string|int, mixed>|null
Parameters
- $name : string
Return values
string|array<string|int, mixed>|nullgetSourceId()
Get source ID.
public
getSourceId() : int|null
Return values
int|nullgetValues()
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>isEmpty()
Returns true if the dictionary is empty.
public
isEmpty() : bool
Return values
booljsonSerialize()
JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON
public
jsonSerialize() : array<string|int, mixed>
Attributes
- #[ReturnTypeWillChange]
Return values
array<string|int, mixed>offsetSet()
\ArrayAccess thing.
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
-
Offset.
- $value : mixed
-
Value.
set()
public
set(mixed $name[, mixed $value = null ]) : mixed
Parameters
- $name : mixed
- $value : mixed = null
setChannel()
Add an complex identificator to the collection.
public
setChannel(Base $channel[, int $offset = null ]) : void
Parameters
- $channel : Base
-
Channel object.
- $offset : int = null
-
Offset in the array.
setValues()
public
setValues(mixed $values) : mixed
Parameters
- $values : mixed
toArray()
Convert to array.
public
toArray() : array<string|int, Base>
Return values
array<string|int, Base>toSimpleArray()
Convert to array of identificators.
public
toSimpleArray() : array<string|int, mixed>