Dictionary implements ArrayAccess, Iterator, Countable, JsonSerializable
Table of Contents
Interfaces
- ArrayAccess
- Iterator
- Countable
- JsonSerializable
Methods
- __construct() : mixed
- Creates object.
- __unserialize() : void
- clear() : mixed
- get() : string|array<string|int, mixed>|null
- Returns any variable by its name. Null if variable is not set.
- 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
- set() : mixed
- setValues() : mixed
- toArray() : array<string|int, mixed>
- Returns the values as an array.
Methods
__construct()
Creates object.
public
__construct([array<string|int, mixed>|null $values = null ]) : mixed
Parameters
- $values : array<string|int, mixed>|null = null
__unserialize()
public
__unserialize(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
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>|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>set()
public
set(mixed $name[, mixed $value = null ]) : mixed
Parameters
- $name : mixed
- $value : mixed = null
setValues()
public
setValues(mixed $values) : mixed
Parameters
- $values : mixed
toArray()
Returns the values as an array.
public
toArray() : array<string|int, mixed>