PHPackages                             psx/atom - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. psx/atom

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

psx/atom
========

Model classes to generate an Atom specification in a type-safe way

v0.2.0(5mo ago)06Apache-2.0PHPPHP &gt;=8.1CI passing

Since May 10Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/apioo/psx-atom)[ Packagist](https://packagist.org/packages/psx/atom)[ Docs](https://phpsx.org)[ Fund](https://www.paypal.me/fusioapi)[ GitHub Sponsors](https://github.com/chriskapp)[ RSS](/packages/psx-atom/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Atom
====

[](#atom)

About
-----

[](#about)

This library contains model classes to generate an Atom specification in a type-safe way. The models are automatically generated based on the [TypeSchema](https://typeschema.org/) specification (s. `typeschema.json`). The following example shows how you can generate an Atom spec:

```
$person = new Person();
$person->setName('foobar');
$person->setUri('http://foo.com');
$person->setEmail('foo@bar.com');

$text = new Text();
$text->setContent('foobar');

$entry = new Entry();
$entry->setAuthor([$person]);
$entry->setContent($text);
$entry->setId('http://localhost.com#1');
$entry->setTitle('Star City');
$entry->setPublished(LocalDateTime::from(new \DateTime('Tue, 10 Jun 2003 04:00:00 GMT')));

$atom = new Atom();
$atom->setId('http://localhost.com');
$atom->setTitle('Foo has bar');
$atom->setUpdated(LocalDateTime::from(new \DateTime('Tue, 10 Jun 2003 04:00:00 GMT')));
$atom->setEntry([$entry]);

echo json_encode($asyncAPI, JSON_PRETTY_PRINT);
```

This would result in the following JSON:

```
{
  "id": "http:\/\/localhost.com",
  "title": "Foo has bar",
  "updated": "2003-06-10T04:00:00Z",
  "entry": [
    {
      "author": [
        {
          "name": "foobar",
          "uri": "http:\/\/foo.com",
          "email": "foo@bar.com"
        }
      ],
      "content": {
        "content": "foobar"
      },
      "id": "http:\/\/localhost.com#1",
      "published": "2003-06-10T04:00:00Z",
      "title": "Star City"
    }
  ]
}
```

Contribution
------------

[](#contribution)

If you want to suggest changes please only change the `typeschema.json` specification and then run the `php gen.php` script to regenerate all model classes.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance73

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~582 days

Total

2

Last Release

154d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2505846?v=4)[Christoph Kappestein](/maintainers/chriskapp)[@chriskapp](https://github.com/chriskapp)

---

Top Contributors

[![chriskapp](https://avatars.githubusercontent.com/u/2505846?v=4)](https://github.com/chriskapp "chriskapp (5 commits)")

---

Tags

atommodeldto

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/psx-atom/health.svg)

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

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)[scrumble-nl/laravel-model-ts-type

This package makes it possible to generate TypeScript types based on your models

6984.5k](/packages/scrumble-nl-laravel-model-ts-type)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[michalsn/codeigniter4-uuid

UUID and ULID package for CodeIgniter 4 with support for Model.

4728.7k4](/packages/michalsn-codeigniter4-uuid)[nutgram/hydrator

Hydrator for PHP 8.0+

12265.2k6](/packages/nutgram-hydrator)[cerbero/dto

Data Transfer Object (DTO)

17119.4k1](/packages/cerbero-dto)

PHPackages © 2026

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