AccessLog
in package
Records which view model fields a template read (for the mandatory field guard).
Only leaf values that are not null (scalars, formatted values) are recorded, so counting or iterating a list does not count as printing it. Paths may contain "[*]": for self::accessed() it matches any list index, self::expand() lists every index.
Aliases map one view model node onto another, e.g. "issuer" onto "seller": a template that prints $invoice->issuer->address has printed the seller's address.
Table of Contents
Methods
- accessed() : bool
- Whether $path or any field below it was read.
- all() : array<int, string>
- bind() : void
- The view model data the paths refer to, for {@see self::expand()}.
- expand() : array<int, string>
- The concrete paths of $pattern that hold a value (not null, not an empty list) in the bound data; "[*]" expands to every index, e.g. "vatRows[*].amount" to ["vatRows[0].amount", "vatRows[1].amount"].
- hasData() : bool
- record() : void
- reset() : void
Methods
accessed()
Whether $path or any field below it was read.
public
accessed(string $path) : bool
Parameters
- $path : string
Return values
boolall()
public
all() : array<int, string>
Return values
array<int, string>bind()
The view model data the paths refer to, for {@see self::expand()}.
public
bind(array<string|int, mixed> $data[, array<string, string> $aliases = [] ]) : void
Parameters
- $data : array<string|int, mixed>
- $aliases : array<string, string> = []
-
path prefix => path prefix it stands for
expand()
The concrete paths of $pattern that hold a value (not null, not an empty list) in the bound data; "[*]" expands to every index, e.g. "vatRows[*].amount" to ["vatRows[0].amount", "vatRows[1].amount"].
public
expand(string $pattern) : array<int, string>
Parameters
- $pattern : string
Return values
array<int, string>hasData()
public
hasData() : bool
Return values
boolrecord()
public
record(string $path) : void
Parameters
- $path : string
reset()
public
reset() : void