PHPackages                             rossriley/doctrine-entity-base - 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. [Database &amp; ORM](/categories/database)
4. /
5. rossriley/doctrine-entity-base

ActiveLibrary[Database &amp; ORM](/categories/database)

rossriley/doctrine-entity-base
==============================

Single class package to provide base getter/setter functions for Doctrine Entities

1.0.0(11y ago)11.2kMITPHP

Since Nov 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/rossriley/doctrine-entity-base)[ Packagist](https://packagist.org/packages/rossriley/doctrine-entity-base)[ RSS](/packages/rossriley-doctrine-entity-base/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Doctrine Entity Base Class
--------------------------

[](#doctrine-entity-base-class)

This base class is designed to provide a few out of the box hooks for Entity classes.

### Extending

[](#extending)

Create your entity class and simply extend this base class. For example:

```

```

### Constructing with data

[](#constructing-with-data)

You can now create a new entity class and pre-seed it with data.

```
$object = new Myentity(['option1'=>'test','option2'=>'test']);

```

### Property getters and setters

[](#property-getters-and-setters)

You can get and set properties via getter and setter syntax.

```
$object = new Myentity();
$object->option1 = 'test';
echo $object->option1; // 'test'

```

### Support for method getters and setters

[](#support-for-method-getters-and-setters)

If you'd prefer to use methods to get and set, this works the same:

```
$object = new Myentity();
$object->setOption1('test');
echo $object->getOption1(); // 'test'

```

### Serialize

[](#serialize)

You can quickly serialize your entity object by calling the `serialize()` method.

```
$object = new Myentity();
$object->setOption1('test');
print_r($object->serialize()); // ['option1'=>'test', 'option2'=>'']

```

### Providing your own methods.

[](#providing-your-own-methods)

If you want to override the default behaviour for any of the properties on your object then you can do so by supplying your own methods. These will always be used ahead of the fallback behaviour.

```

```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

4192d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5082?v=4)[Ross Riley](/maintainers/rossriley)[@rossriley](https://github.com/rossriley)

---

Top Contributors

[![rossriley](https://avatars.githubusercontent.com/u/5082?v=4)](https://github.com/rossriley "rossriley (9 commits)")

### Embed Badge

![Health badge](/badges/rossriley-doctrine-entity-base/health.svg)

```
[![Health](https://phpackages.com/badges/rossriley-doctrine-entity-base/health.svg)](https://phpackages.com/packages/rossriley-doctrine-entity-base)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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