php-vitexsoftware-pohodaser

php-vitexsoftware-pohodaser 0.1.0.4~trixie

 pool/main/p/php-vitexsoftware-pohodaser/php-vitexsoftware-pohodaser_0.1.0.4~trixie_amd64.deb php-vitexsoftware-pohodaser
Stormware's Pohoda XML/PHP serialization
Filename pool/main/p/php-vitexsoftware-pohodaser/php-vitexsoftware-pohodaser_0.1.0.4~trixie_amd64.deb
Version0.1.0.4~trixie
Age in days311
Release date2025 12. 29.
Size240.63 KB
id4233
Namephp-vitexsoftware-pohodaser
Package
Appname
Essential
Vendor
License
Distributiontrixie
Suitemain
Source
Architecturebinary-amd64
MultiArchforeign
MaintainerVítězslav Dvořák
InstalledSize4816
Dependscomposer-debian
PreDepends
Breaks
Enhances
Sectionunknown
Priorityoptional
DescriptionStormware's Pohoda XML/PHP serialization
LongDescriptionThis library provides a PHP-based solution for serializingand deserializing XML data for Stormware's Pohoda accountingsoftware. It is designed to work with Pohoda's XML schemadefinitions (XSD) and simplifies the process of integratingPohoda's data exchange into your PHP applications.
AutoBuiltPackage
Filenamepool/main/p/php-vitexsoftware-pohodaser/php-vitexsoftware-pohodaser_0.1.0.4~trixie_amd64.deb
MD5sumc4bb063c6f71fd8da331d877b5086b5b
SHA1bad8872454a355f7c4b81903514069c50802730c
SHA256e1fbde0652b15282b1978db16be8abbc6fd98e198ea033a49a00241aeb37f78c
SHA512a3abf730f1bab537e15e83d3a5c99f0cea18ed70391080338634a7d0f6f613a656c543485b8b2b9feaf21994da31ccfc7d66d2cf3a412a71135441e128f703bf
Size246408
Auto-Built-Package
Homepagehttps://github.com/VitexSoftware/pohodaser
Provides
Existing
fileMtime2025-12-29 01:46:58
created2025-08-26 22:26:36
updated2025-12-29 01:46:58
php-vitexsoftware-pohodaser
<>

Pohoda (Re)Serialize

wakatime

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

  • 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


Installation

Install the library using Composer:

composer require vitexsoftware/pohodaser

XSD Taken from https://www.stormware.cz/xml/schema/all_schema_ver2.zip


Example Usage

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

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

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";
}