/zugferd-factur-x

A XML generator for ZUGFeRD / Factur-X / XRechnung written in PHP.

Primary LanguageXSLTMIT LicenseMIT

ZUGFeRD PHP

Build Status Latest Stable Version Total Downloads License

XML generator for ZUGFeRD / Factur-X / XRechnung written in PHP. Convert PHP Objects to XML and back.

Look @ Tests for more details

Installation

The recommended way of installing this library is using Composer.

Add this repository to your composer information using the following command

composer require silarhi/zugferd-factur-x

Usage ZUGFeRD v2.1

Convert XML to PHP Objects:

use src\Reader;

$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);

Convert PHP Objects to XML:

use src\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.