MapValue
in package
FinalYes
An array `Writer` writes as a map -- a block -- whatever its shape: the one way to say that an empty array is an empty map (`logger {}`) rather than an empty list (`logger = []`), or that an array keyed `0`, `1`, ... is a map keyed `"0"`, `"1"`, .... A PHP array cannot say which it is, and both load back as the same array, so `Writer` reads a bare one as a list. The difference is in what the document means (CASC.md ยง5.4): written over a map that is already there -- in an overlay, say -- `{}` merges and leaves it as it is, where `[]` replaces it.
Table of Contents
Properties
- $entries : array<string|int, mixed>
Methods
- __construct() : mixed
Properties
$entries read-only
public
array<string|int, mixed>
$entries
= []
Methods
__construct()
public
__construct([array<string|int, mixed> $entries = [] ]) : mixed
Parameters
- $entries : array<string|int, mixed> = []
-
the map's entries, written in the order given