noka-design/php-ubl
将 UBL xml 反序列化为 PHP 对象
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-09-18 16:12:48 UTC
README
将 UBL v2.0 发票(xml)反序列化为 PHP 对象,反之亦然。
安装
composer require noka-design/php-ubl
使用方法
$serializer = \NOKA\PHPUBL\PHPUBL::getSerializer(); $xml = file_get_contents('path/to/invoice.sml'); $invoice = $serializer->deserialize($xml, \NOKA\PHPUBL\UBL\Invoice::class, 'xml');
致谢
使用 xsd2php 生成的类
使用 JMS Serializer 进行序列化和反序列化
使用来自 Oasis 的 UBL 2.0 架构定义