Skip to content

API reference / Quittio \ Core \ Formats

OutputFormat

final readonly class in quittio/core

Quittio\Core\Formats\OutputFormat · Source

Definition of an output format.

Properties#

PropertyTypeDescription
$defaultProfile readonlystring|nullprofile used when none is given
$embedsXml readonlyboolwhether the XML is embedded in the PDF (ZUGFeRD/Factur-X)
$html readonlybool
$json readonlybool
$key readonlystring
$pdf readonlyboolwhether a PDF is produced
$profiles readonlylist<string>allowed profile keys; empty = every profile that supports the syntax
$syntax readonlySyntax|nullXML syntax, null for formats without XML

Methods#

MethodDescription
->__construct()
->allowsProfile()
->hasXml()
->isEInvoice()Whether the format is an e-invoice in the sense of EN 16931 (structured XML).

__construct()#

public function __construct(
    string $key,
    Syntax|null $syntax = null,
    bool $pdf = false,
    bool $embedsXml = false,
    string|null $defaultProfile = null,
    list<string> $profiles = [],
    bool $html = false,
    bool $json = false,
)
ParameterTypeDescription
$keystring
$syntaxSyntax|null = nullXML syntax, null for formats without XML
$pdfbool = falsewhether a PDF is produced
$embedsXmlbool = falsewhether the XML is embedded in the PDF (ZUGFeRD/Factur-X)
$defaultProfilestring|null = nullprofile used when none is given
$profileslist<string> = []allowed profile keys; empty = every profile that supports the syntax
$htmlbool = false
$jsonbool = false

allowsProfile()#

public function allowsProfile(string $key): bool
ParameterTypeDescription
$keystring
Returns
bool

hasXml()#

public function hasXml(): bool
Returns
bool

isEInvoice()#

public function isEInvoice(): bool

Whether the format is an e-invoice in the sense of EN 16931 (structured XML).

Returns
bool

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