Quittio 0.3 API

ViewNode
in package
implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable

Read-only node of the invoice view model with recorded property access.

Templates use object syntax ($invoice->seller->name). Every read of a leaf value that is not null (scalar or formatted value) is recorded in the access log, so that the mandatory field guard can tell which values a custom template printed. A value counts as printed when it is read as a leaf: also in a condition such as if ($invoice->buyer->vatId) and while a loop reads the items of a list. Counting a list (count(), isEmpty(), isset()) and reading null values are not recorded: count($invoice->legalNotes) prints no note.

Tags
implements

Table of Contents

Interfaces

ArrayAccess
Countable
IteratorAggregate
JsonSerializable

Properties

$data  : array<string|int, mixed>
$log  : AccessLog
$path  : string

Methods

__construct()  : mixed
__get()  : mixed
__isset()  : bool
count()  : int
getIterator()  : Traversable
Items are read (and recorded) one by one while the template loops over them.
isEmpty()  : bool
jsonSerialize()  : mixed
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
toArray()  : array<string|int, mixed>
Plain values, e.g. for implode(); counts as reading every value below this node.
read()  : mixed

Properties

$data

protected array<string|int, mixed> $data

Methods

__construct()

public __construct(array<string|int, mixed> $data, AccessLog $log[, string $path = '' ]) : mixed
Parameters
$data : array<string|int, mixed>
$log : AccessLog
$path : string = ''

__get()

public __get(string $name) : mixed
Parameters
$name : string

__isset()

public __isset(string $name) : bool
Parameters
$name : string
Return values
bool

count()

public count() : int
Return values
int

getIterator()

Items are read (and recorded) one by one while the template loops over them.

public getIterator() : Traversable
Return values
Traversable

isEmpty()

public isEmpty() : bool
Return values
bool

jsonSerialize()

public jsonSerialize() : mixed

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

toArray()

Plain values, e.g. for implode(); counts as reading every value below this node.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

read()

protected read(string|int $key) : mixed
Parameters
$key : string|int
On this page

Search results