Skip to content

API reference / Quittio \ Core \ View \ Model

TotalsView

final class in quittio/core · extends ViewNode

Quittio\Core\View\Model\TotalsView · Source

The document totals (BG-22).

A typed, read-only node of the view model: object syntax and array syntax read the same value, and every read is recorded for the mandatory field guard (see ViewNode).

Properties#

PropertyTypeDescription
$data protectedarray<string|int, mixed> from ViewNode
$log protectedAccessLog from ViewNode
$path protectedstring from ViewNode

Methods#

MethodDescription
->__construct()
->__get()
->__isset()
->count()
->getIterator()Items are read (and recorded) one by one while the template loops over them.
->isEmpty()
->jsonSerialize()
->offsetExists()
->offsetGet()
->offsetSet()
->offsetUnset()
->read()
->toArray()Plain values, e.g. for implode(); counts as reading every value below this node.

__construct()#

public function __construct(
    array<string|int, mixed> $data,
    AccessLog $log,
    string $path = '',
)

inherited from ViewNode

ParameterTypeDescription
$dataarray<string|int, mixed>
$logAccessLog
$pathstring = ''

__get()#

public function __get(string $name): mixed

inherited from ViewNode

ParameterTypeDescription
$namestring
Returns
mixed

__isset()#

public function __isset(string $name): bool

inherited from ViewNode

ParameterTypeDescription
$namestring
Returns
bool

count()#

public function count(): int

inherited from ViewNode

Returns
int

getIterator()#

public function getIterator(): Traversable

inherited from ViewNode

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

Returns
Traversable

isEmpty()#

public function isEmpty(): bool

inherited from ViewNode

Returns
bool

jsonSerialize()#

public function jsonSerialize(): mixed

inherited from ViewNode

Returns
mixed

offsetExists()#

public function offsetExists(mixed $offset): bool

inherited from ViewNode

ParameterTypeDescription
$offsetmixed
Returns
bool

offsetGet()#

public function offsetGet(mixed $offset): mixed

inherited from ViewNode

ParameterTypeDescription
$offsetmixed
Returns
mixed

offsetSet()#

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

inherited from ViewNode

ParameterTypeDescription
$offsetmixed
$valuemixed

offsetUnset()#

public function offsetUnset(mixed $offset): void

inherited from ViewNode

ParameterTypeDescription
$offsetmixed

read()#

protected function read(string|int $key): mixed

protected inherited from ViewNode

ParameterTypeDescription
$keystring|int
Returns
mixed

toArray()#

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

inherited from ViewNode

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

Returns
array<string|int, mixed>

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.