PHPackages                             xanweb/c5-entity - 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. xanweb/c5-entity

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

xanweb/c5-entity
================

ConcreteCMS Entity

v2.0(4y ago)1408MITPHPPHP &gt;=7.4

Since Mar 24Pushed 4y ago3 watchersCompare

[ Source](https://github.com/Xanweb/c5-entity)[ Packagist](https://packagist.org/packages/xanweb/c5-entity)[ RSS](/packages/xanweb-c5-entity/feed)WikiDiscussions main Synced 1w ago

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

ConcreteCMS Entity
==================

[](#concretecms-entity)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9ab14e21f3378b73af2e354e8540f466c4ef1170b22221fc4ce4ba36db7887ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78616e7765622f63352d656e746974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xanweb/c5-entity)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Reusable classes for entities

Installation
------------

[](#installation)

Include library to your composer.json

```
composer require xanweb/c5-entity
```

Usage
-----

[](#usage)

Simply you can extend EntityService and EntityObject classes to benefit from predefined methods

```
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="MyEntityTable")
 */
class MyEntity extends \Xanweb\C5\Entity\EntityObject {
    ...
}

/**
 * @method MyEntity createEntity()
 * @method MyEntity create($data)
 * @method MyEntity getByID($id)
 * @method MyEntity[] getList()
 *
 * or if your IDE supports generic type
 * @implements EntityService
 */
class MyEntityService extends \Xanweb\C5\Entity\Service\EntityService {
    /**
     * {@inheritdoc}
     *
     * @see \Xanweb\C5\Entity\Service\EntityService::getEntityClass()
     */
    public function getEntityClass(): string
    {
        return MyEntity::class;
    }
}
```

Use TimeStampableTrait to include created date and last updated date fields to your entity.
Please note that usage of this trait requires "HasLifecycleCallbacks" annotation.
See [https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/reference/annotations-reference.html#annref\_haslifecyclecallbacks](https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/reference/annotations-reference.html#annref_haslifecyclecallbacks)

```
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="MyEntityTable")
 * @ORM\HasLifecycleCallbacks
 */
class MyEntity extends \Xanweb\C5\Entity\EntityObject {
    use \Xanweb\C5\Entity\Traits\TimeStampableTrait;
    ...
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

1669d ago

Major Versions

v1.0 → v2.02021-10-22

PHP version history (2 changes)v1.0PHP ^7.2

v2.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13836863?v=4)[Hamed Darragi](/maintainers/HamedDarragi)[@HamedDarragi](https://github.com/HamedDarragi)

---

Top Contributors

[![HamedDarragi](https://avatars.githubusercontent.com/u/13836863?v=4)](https://github.com/HamedDarragi "HamedDarragi (8 commits)")

---

Tags

libraryconcreteCMSConcreteCMS-v9

### Embed Badge

![Health badge](/badges/xanweb-c5-entity/health.svg)

```
[![Health](https://phpackages.com/badges/xanweb-c5-entity/health.svg)](https://phpackages.com/packages/xanweb-c5-entity)
```

###  Alternatives

[adodb/adodb-php

ADOdb is a PHP database abstraction layer library

4553.9M28](/packages/adodb-adodb-php)[darsyn/ip

An immutable IP Address value object that provides several different notations, including helper functions.

2572.0M20](/packages/darsyn-ip)[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

64401.8k10](/packages/rah-danpu)[zachflower/ignorable-observers

Dynamically disable/enable Laravel's Eloquent model observers

24321.1k](/packages/zachflower-ignorable-observers)[stefangabos/zebra_database

An advanced, compact and lightweight MySQL database wrapper library, built around PHP's MySQLi extension.

11812.0k](/packages/stefangabos-zebra-database)[williamdes/mariadb-mysql-kbs

An index of the MariaDB and MySQL Knowledge bases

111.1M1](/packages/williamdes-mariadb-mysql-kbs)

PHPackages © 2026

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