API reference / Quittio \ Core \ Xml \ Cii
CiiReader
final class in quittio/core · implements FormatReader
Quittio\Core\Xml\Cii\CiiReader · Source
Reads UN/CEFACT Cross Industry Invoices (Factur-X/ZUGFeRD, XRechnung CII) into the data model.
Declared totals are kept unchanged; differences to a recalculation are reported by the invoice reader, not silently corrected.
Constants#
| Constant | Value | Description |
|---|---|---|
MAX_SUBLINE_DEPTH | 32 | Deepest accepted sub line hierarchy (ParentLineID chains). |
Methods#
| Method | Description |
|---|---|
->canRead() | Whether the root element is a CrossIndustryInvoice in the CII namespace. |
->read() | Reads the CII document into invoice data, with the declared totals and VAT breakdown unchanged and the findings of reading. $xml is the source text of $document, kept in the result. |
canRead()#
public function canRead(DOMDocument $document): boolWhether the root element is a CrossIndustryInvoice in the CII namespace.
| Parameter | Type | Description |
|---|---|---|
$document | DOMDocument |
- Returns
bool
read()#
public function read(DOMDocument $document, string $xml): ReadResultReads the CII document into invoice data, with the declared totals and VAT breakdown unchanged and the findings of reading. $xml is the source text of $document, kept in the result.
| Parameter | Type | Description |
|---|---|---|
$document | DOMDocument | |
$xml | string |
- Returns
ReadResult