Quittio 0.3 API

BuildsPresentationAndMeta

Presentation, locale, time zone, custom values, flags and the source of the invoice.

Part of InvoiceBuilder, which holds the state; use the builder, not the trait.

Table of Contents

Methods

custom()  : static
Free data for templates (view model key meta.custom); the same key replaces the value.
flag()  : static
Sets a flag that country packs evaluate (e.g. a small amount invoice in Germany).
locale()  : static
Language of the invoice: labels, generated texts and the exemption texts of presets.
presentation()  : static
Design of this invoice in PDF and HTML: a Presentation replaces it, an array changes single values (->presentation(['introText' => 'Thank you for your order.', 'showGrossPrices' => true])), a callable receives the current Presentation and returns the new one.
source()  : static
Origin of the data, e.g. "shop" (view model key meta.source).
timezone()  : static
Time zone for DateTimeInterface values and for the default issue date; call it before the date setters.

Methods

custom()

Free data for templates (view model key meta.custom); the same key replaces the value.

public custom(string $key, mixed $value) : static
Parameters
$key : string
$value : mixed
Return values
static

flag()

Sets a flag that country packs evaluate (e.g. a small amount invoice in Germany).

public flag(string $flag[, bool $enabled = true ]) : static
Parameters
$flag : string
$enabled : bool = true
Return values
static

locale()

Language of the invoice: labels, generated texts and the exemption texts of presets.

public locale(string $locale) : static

The locale of a render call wins; without both, the configured locale or the country default.

Parameters
$locale : string
Return values
static

presentation()

Design of this invoice in PDF and HTML: a Presentation replaces it, an array changes single values (->presentation(['introText' => 'Thank you for your order.', 'showGrossPrices' => true])), a callable receives the current Presentation and returns the new one.

public presentation(Presentation|array<string, mixed>|callable(Presentation): Presentation $presentation) : static
Parameters
$presentation : Presentation|array<string, mixed>|callable(Presentation): Presentation
Return values
static

source()

Origin of the data, e.g. "shop" (view model key meta.source).

public source(string $source) : static
Parameters
$source : string
Return values
static

timezone()

Time zone for DateTimeInterface values and for the default issue date; call it before the date setters.

public timezone(string $timezone) : static
Parameters
$timezone : string
Return values
static
On this page

Search results