PHPackages                             vitexsoftware/pohodaser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. vitexsoftware/pohodaser

ActiveLibrary

vitexsoftware/pohodaser
=======================

Stormware's Pohoda XML/PHP serialization

0.1.2(1y ago)13.5k↓29%1MITPHPCI passing

Since Apr 18Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/VitexSoftware/php-pohoda-serialize)[ Packagist](https://packagist.org/packages/vitexsoftware/pohodaser)[ RSS](/packages/vitexsoftware-pohodaser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (8)Used By (1)

Pohoda (Re)Serialize
====================

[](#pohoda-reserialize)

[![wakatime](https://camo.githubusercontent.com/528d1bc3f8f1dc0004a415f10fae0170ecf59f0af88dc125fca45e022c8f5066/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f757365722f35616262613963612d383133652d343361632d396235662d6231636664663364633163372f70726f6a6563742f37626638633433352d366664332d343536382d393830612d6537383235333538353134332e737667)](https://wakatime.com/badge/user/5abba9ca-813e-43ac-9b5f-b1cfdf3dc1c7/project/7bf8c435-6fd3-4568-980a-e78253585143)

Stormware's Pohoda XML/PHP serializer.

This library provides a PHP-based solution for serializing and deserializing XML data for Stormware's Pohoda accounting software. It is designed to work with Pohoda's XML schema definitions (XSD) and simplifies the process of integrating Pohoda's data exchange into your PHP applications.

---

Features
--------

[](#features)

- **XML Serialization**: Convert PHP objects into Pohoda-compatible XML.
- **XML Deserialization**: Parse Pohoda XML files into PHP objects.
- **XSD Integration**: Automatically maps XML schema definitions to PHP classes.
- **Customizable**: Extend and modify the library to fit your specific Pohoda integration needs.

---

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Composer
- [JMS Serializer](https://jmsyst.com/libs/serializer)
- [GoetasWebservices XSD2PHP](https://github.com/goetas-webservices/xsd2php)

---

Installation
------------

[](#installation)

Install the library using Composer:

```
composer require vitexsoftware/pohodaser
```

XSD Taken from [https://www.stormware.cz/xml/schema/all\_schema\_ver2.zip](https://www.stormware.cz/xml/schema/all_schema_ver2.zip)

---

Example Usage
-------------

[](#example-usage)

### Serialize an Invoice Object to XML

[](#serialize-an-invoice-object-to-xml)

```
use Pohoda\Invoice\Invoice;
use Pohoda\XML\SerializerBuilder;

// Create an instance of the serializer
$serializer = SerializerBuilder::create()->build();

// Create an invoice object
$invoice = new InvoiceType();
$invoice->setId(123);
$invoice->setName('Sample Invoice');

// Serialize the object to XML
$xmlContent = $serializer->serialize($invoice, 'xml');

echo $xmlContent;
```

### Deserialize XML to an Invoice Object

[](#deserialize-xml-to-an-invoice-object)

```
use Pohoda\Invoice\InvoiceType;
use Pohoda\XML\SerializerBuilder;

// Create an instance of the serializer
$serializer = SerializerBuilder::create()->build();

// Load XML content
$xmlContent = file_get_contents('path/to/invoice.xml');

// Deserialize the XML into a PHP object
$invoice = $serializer->deserialize($xmlContent, InvoiceType::class, 'xml');

print_r($invoice);
```

### Detect and Deserialize XML to a PHP Object

[](#detect-and-deserialize-xml-to-a-php-object)

```
use Pohoda\Xml\Helper;
use Pohoda\XML\SerializerBuilder;

$serializer = SerializerBuilder::create()->build();
$xmlContent = file_get_contents('path/to/faktury_03_v2.0.xml');

// Detect the PHP class name from the XML
$phpClassName = Helper::xml2ns($xmlContent);

if ($phpClassName) {
    $object = $serializer->deserialize($xmlContent, $phpClassName, 'xml');
    print_r($object);
} else {
    echo "Namespace not found for the root element.\n";
}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance70

Regular maintenance activity

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f24039b55245f141b108d0245b5821fe6cc4bb0585e36283f97301cd3aa792bc?d=identicon)[vitex](/maintainers/vitex)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (25 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")

---

Tags

pohoda

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vitexsoftware-pohodaser/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-pohodaser/health.svg)](https://phpackages.com/packages/vitexsoftware-pohodaser)
```

###  Alternatives

[horstoeko/zugferd

A library for creating and reading european electronic invoices

4174.3M18](/packages/horstoeko-zugferd)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[sulu/article-bundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system

66409.6k2](/packages/sulu-article-bundle)[goetas-webservices/soap-client

17541.5k5](/packages/goetas-webservices-soap-client)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
