API reference / Quittio \ Core \ Xml
XmlSerializer
interface in quittio/core
Quittio\Core\Xml\XmlSerializer · Source
Writes calculated invoice data as XML in one syntax.
Methods#
| Method | Description |
|---|---|
->serialize() | Writes the calculated invoice as XML of this syntax for $profile; throws CalculationException if the invoice is not calculated. |
->syntax() | The XML syntax this serializer writes, e.g. CII or UBL. |
serialize()#
public function serialize(
InvoiceData $invoice,
Profile $profile,
SerializationOptions $options = new \Quittio\Core\Xml\SerializationOptions(),
): stringWrites the calculated invoice as XML of this syntax for $profile; throws CalculationException if the invoice is not calculated.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$profile | Profile | |
$options | SerializationOptions = new \Quittio\Core\Xml\SerializationOptions() |
- Returns
string
syntax()#
public function syntax(): SyntaxThe XML syntax this serializer writes, e.g. CII or UBL.
- Returns
Syntax