PHPackages                             frontastic/data-object - 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. frontastic/data-object

ActiveLibrary

frontastic/data-object
======================

Simple base class for data objects.

v1.0.0(3y ago)0115.7k↓38.9%2MITPHP

Since Oct 7Pushed 3y agoCompare

[ Source](https://github.com/FrontasticGmbH/DataObject)[ Packagist](https://packagist.org/packages/frontastic/data-object)[ RSS](/packages/frontastic-data-object/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (2)

Data Object
===========

[](#data-object)

[![Travis Build Status](https://camo.githubusercontent.com/231e4d5d6e77a61cdccaf94f0eb006e1ab434c664ec9bc9feadcdeab8f9be06c/68747470733a2f2f7472617669732d63692e6f72672f6b6f72652f446174614f626a6563742e737667 "Travis Build Status")](https://travis-ci.org/kore/DataObject)

This repository just contains a simple base class for PHP data objects.

This class throws exceptions if you try to read or write unknown properties, and ensures a clone is performed recursively.

Usage
-----

[](#usage)

To use this data object base class for your own data objects, just use something like this:

```
class Person extends \Kore\DataObject\DataObject
{
    public $prename;

    public $forename;
}
```

If you now access unknown properties you will get exceptions. For more details on the motivation behind this, read: [http://qafoo.com/blog/016\_struct\_classes\_in\_php.html](http://qafoo.com/blog/016_struct_classes_in_php.html)

In some cases it might be necessary that additional attributes can be passed while construction and are knowingly ignored and not added to the DataObject. Therefore a constructor parameter `$ignoreAdditionalAttributes` has been added, which is set to `true` by default. This will allow to create a DataObject of an array with more values where the additional values will be ignored and no exception will be thrown **during** construction. If you later try to access a property which is not existing though, an exception will be raised! On the other hand, if it's set to false it will throw an exception if you pass a value that doesn't match any property on the object.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

1319d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/0efbde993c12c5386754d74128e633e7195a90d423307940707e540570c87563?d=identicon)[frontastic](/maintainers/frontastic)

![](https://www.gravatar.com/avatar/80ff77c23e505855056ec82d07dafb5e1a92087e31b65d4e3038af62ae3b315e?d=identicon)[frontastic-developers](/maintainers/frontastic-developers)

---

Top Contributors

[![kore](https://avatars.githubusercontent.com/u/154398?v=4)](https://github.com/kore "kore (20 commits)")[![schaumiii](https://avatars.githubusercontent.com/u/654148?v=4)](https://github.com/schaumiii "schaumiii (6 commits)")[![brunofjesus](https://avatars.githubusercontent.com/u/9934377?v=4)](https://github.com/brunofjesus "brunofjesus (3 commits)")[![tobyS](https://avatars.githubusercontent.com/u/187140?v=4)](https://github.com/tobyS "tobyS (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/frontastic-data-object/health.svg)

```
[![Health](https://phpackages.com/badges/frontastic-data-object/health.svg)](https://phpackages.com/packages/frontastic-data-object)
```

PHPackages © 2026

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