Quittio 0.3 API

InvoiceViewModel extends ViewNode
in package

FinalYes

The only object templates receive. Every value is available formatted ($value->formatted or {{ $value }}) and raw ($value->raw).

Templates contain no calculation logic; all values are calculated beforehand.

Table of Contents

Properties

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

Methods

__construct()  : mixed
__get()  : mixed
__isset()  : bool
accessLog()  : AccessLog
count()  : int
getIterator()  : Traversable
Items are read (and recorded) one by one while the template loops over them.
isEmpty()  : bool
jsonSerialize()  : mixed
label()  : string
Translated label; per invoice overrides from the presentation data win.
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
title()  : string
Document title (e.g. "Invoice", "Credit note") for PDF metadata and file names.
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, mixed> $data[, AccessLog|null $log = null ][, array<string, string> $aliases = [] ]) : mixed
Parameters
$data : array<string, mixed>
$log : AccessLog|null = null
$aliases : array<string, string> = []

view model nodes that stand for others, e.g. issuer => seller

__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

label()

Translated label; per invoice overrides from the presentation data win.

public label(string $key[, array<string, string> $replace = [] ]) : string
Parameters
$key : string
$replace : array<string, string> = []
Return values
string

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

title()

Document title (e.g. "Invoice", "Credit note") for PDF metadata and file names.

public title() : string
Return values
string

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