Skip to content

API reference

Quittio\Core\View

quittio/core#

Quittio\Core\View

  • AccessLogRecords which view model fields a template read (for the mandatory field guard).
  • AddressFormatter interfaceFormats postal addresses according to the conventions of a country.
  • CountryNamesCountry names from ext-intl with the ISO code as fallback.
  • FormattedValueA value for templates: formatted for display and available in raw form. Casting to string returns the formatted value, so {{ $value }} prints it.
  • Formatter interfaceFormats values for display according to a locale.
  • InternationalAddressFormatterFallback address format: street lines, "postcode city", subdivision and, for foreign recipients, the country name in upper case as the last line.
  • IntlFormatterLocale aware formatting with ext-intl and a fallback for German and English conventions.
  • InvoiceTitleLabel key of the document title for a type code (BT-3).
  • InvoiceViewModelThe only object templates receive. Every value is available formatted ($value->formatted or {{ $value }}) and raw ($value->raw).
  • LetterLayoutPosition of the address field and marks on the first page, in millimetres from the top left corner (e.g. DIN 5008 form A/B in the German country pack).
  • MandatoryFieldGuardChecks after rendering that the template printed all mandatory values.
  • MandatoryFieldMissingA template omitted mandatory invoice information.
  • MarkdownSafe Markdown subset for texts: paragraphs, lists, bold and italic. HTML in the input is shown as text, links keep only their text.
  • ResolvedLogoA logo of the presentation as the renderer gets it: a local file or a checked data URI (Pdf\LogoCache), resolved before the view model is built, so that the view layer does no I/O.
  • ViewContextEverything the view model factory needs besides the invoice data.
  • ViewModelFactoryBuilds the template view model from calculated invoice data.
  • ViewNodeRead-only node of the invoice view model with recorded property access.

Quittio\Core\View\Model

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