easybill/zugferd-php
最新稳定版本:v4.1.0
Composer 安装命令:
composer require easybill/zugferd-php
包简介
ZUGFeRD PHP SDK (Factur-X, XRechnung) - Convert PHP Objects to XML and back.
README 文档
README
ZUGFeRD PHP SDK (Factur-X, XRechnung) - Convert PHP Objects to XML and back.
Installation
The recommended way of installing this library is using Composer.
Add this repository to your composer information using the following command
composer require easybill/zugferd-php
Usage ZUGFeRD v1
Convert XML to PHP Objects:
use Easybill\ZUGFeRD\Reader; $document = Reader::create()->getDocument('zugferd-file.xml'); echo $document->getHeader()->getId(); // Get invoice No.
Convert PHP Objects to XML:
use Easybill\ZUGFeRD\Builder; use Easybill\ZUGFeRD\Model\Document; $doc = new Document(Document::TYPE_COMFORT); $doc->getHeader()->setId('RE1337'); // Set invoice No. $xml = Builder::create()->getXML($doc); echo $xml; // Zugferd XML.
Usage ZUGFeRD v2
Convert XML to PHP Objects:
use Easybill\ZUGFeRD2\Reader; $xml = file_get_contents('factur-x.xml'); $obj = Reader::create()->transform($xml);
Convert PHP Objects to XML:
use Easybill\ZUGFeRD2\Builder; $obj = ...; $xml = Builder::create()->transform($obj); echo $xml; // Zugferd XML.
Contributing
Please feel free to send bug reports and pull requests.
License
Published as open source under the terms of MIT License.
统计信息
- 总下载量: 269.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 92
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-07