noka-design / php-ubl
Deserialize UBL xml to PHP objects
v0.3
2020-11-30 10:18 UTC
Requires
- goetas-webservices/xsd2php-runtime: ^0.2.13
Requires (Dev)
- goetas-webservices/xsd2php: ^0.4.0
This package is auto-updated.
Last update: 2024-10-18 16:23:35 UTC
README
Deserialize UBL v2.0 Invoices (xml) to PHP objects, or vice versa.
Installation
composer require noka-design/php-ubl
Usage
$serializer = \NOKA\PHPUBL\PHPUBL::getSerializer(); $xml = file_get_contents('path/to/invoice.sml'); $invoice = $serializer->deserialize($xml, \NOKA\PHPUBL\UBL\Invoice::class, 'xml');
Credits
Classes generated using xsd2php
Uses JMS Serializer for serializing/deserializing
Uses UBL 2.0 schema definitions from Oasis