silarhi/zugferd-factur-x

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

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 35

Language:XSLT

2.0.0 2024-02-09 17:57 UTC

This package is auto-updated.

Last update: 2024-11-13 14:05:41 UTC


README

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.