API reference / Quittio \ Core \ Formats
OutputFormat
final readonly class in quittio/core
Quittio\Core\Formats\OutputFormat · Source
Definition of an output format.
Properties#
| Property | Type | Description |
|---|---|---|
$defaultProfile readonly | string|null | profile used when none is given |
$embedsXml readonly | bool | whether the XML is embedded in the PDF (ZUGFeRD/Factur-X) |
$html readonly | bool | |
$json readonly | bool | |
$key readonly | string | |
$pdf readonly | bool | whether a PDF is produced |
$profiles readonly | list<string> | allowed profile keys; empty = every profile that supports the syntax |
$syntax readonly | Syntax|null | XML syntax, null for formats without XML |
Methods#
| Method | Description |
|---|---|
->__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,
)| Parameter | Type | Description |
|---|---|---|
$key | string | |
$syntax | Syntax|null = null | XML syntax, null for formats without XML |
$pdf | bool = false | whether a PDF is produced |
$embedsXml | bool = false | whether the XML is embedded in the PDF (ZUGFeRD/Factur-X) |
$defaultProfile | string|null = null | profile used when none is given |
$profiles | list<string> = [] | allowed profile keys; empty = every profile that supports the syntax |
$html | bool = false | |
$json | bool = false |
allowsProfile()#
public function allowsProfile(string $key): bool| Parameter | Type | Description |
|---|---|---|
$key | string |
- Returns
bool
hasXml()#
public function hasXml(): bool- Returns
bool
isEInvoice()#
public function isEInvoice(): boolWhether the format is an e-invoice in the sense of EN 16931 (structured XML).
- Returns
bool