innobrain/laravel-openimmo

This is my package laravel-openimmo

Fund package maintenance!
mgrundkoetter

Installs: 1 774

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 0

Forks: 13

Open Issues: 0

pkg:composer/innobrain/laravel-openimmo

v4.0.1 2026-02-07 13:39 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for working with the OpenImmo XML standard. Provides typed PHP DTOs, XML/JSON serialization, format converters, and Prism schema generation.

Forked from ujamii/openimmo with all German names translated to English and full Laravel integration.

Installation

composer require innobrain/laravel-openimmo

Quick Start

Deserialize OpenImmo XML into DTOs:

use Innobrain\OpenImmo\Facades\OpenImmoService;

$xml = File::get('path/to/openimmo.xml');
$openImmo = OpenImmoService::deserializeObjectFromXml($xml);

Serialize DTOs back to XML or JSON:

$xml = OpenImmoService::serializeObjectIntoXml($openImmo);
$json = OpenImmoService::serializeObjectIntoJson($openImmo);

Use helper functions for fluent DTO building:

use Innobrain\OpenImmo\Dtos\OpenImmo;

use function Innobrain\OpenImmo\Helpers\getProvider;
use function Innobrain\OpenImmo\Helpers\getContactPerson;

$openImmo = new OpenImmo;
getProvider($openImmo)->setProviderNumber('myProvider');
getContactPerson($openImmo)->setName('John Doe');

Helper functions (get{DtoName}) are available for all DTOs in the OpenImmo tree. They create the DTO if it doesn't exist, link it to the parent, and return it.

Features

  • Serialization — Deserialize/serialize OpenImmo XML and JSON via OpenImmoService
  • 115+ typed DTOs — Auto-generated from the OpenImmo XSD schema with English property names
  • Format converters — Convert OpenImmo DTOs to other formats (ships with onOffice Enterprise converter)
  • Schema generation — Generate Prism schemas from DTOs for LLM structured output
  • Helper functions — Fluent getter helpers for navigating and building the DTO tree

Documentation

For full documentation on serialization, converters, and schema generation, visit the documentation site.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The GPLv3 License. Please see License File for more information.