PHPackages                             multibytesystems/mb-components - 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. multibytesystems/mb-components

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

multibytesystems/mb-components
==============================

Helper library to provide base functionality to common tasks when dealing with data driven applications

1.3.0(7y ago)0594MITPHPPHP &gt;=5.3.0

Since Apr 17Pushed 7y agoCompare

[ Source](https://github.com/multibytesystems/mb-components)[ Packagist](https://packagist.org/packages/multibytesystems/mb-components)[ Docs](https://github.com/multibytesystems/mb-components)[ RSS](/packages/multibytesystems-mb-components/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

mb-components
=============

[](#mb-components)

This Zend module provides base classes to simplify handling of doctrine entities. Currently it consists of

- two abstract entity classes
- one general repository class
- one service class

[![Latest Version](https://camo.githubusercontent.com/bdf28553afc6dde9f20f65257bc1a10e4cf0d2bfcfe7f358c120baf4e2e39ce5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d756c74696279746573797374656d732f6d622d636f6d706f6e656e74732e7376673f7374796c653d666c61742d737175617265)](https://github.com/multibytesystems/mb-components/releases) [![Total Downloads](https://camo.githubusercontent.com/ac76a6eddf55b364087352675ec5824c4e78de1da5f855382ed9ee16682a5aff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d756c74696279746573797374656d732f6d622d636f6d706f6e656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/multibytesystems/mb-components) [![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Install
-------

[](#install)

```
composer require multibytesystems/mb-components
```

Entity classes
--------------

[](#entity-classes)

- `MBBaseEntity` simplifies handling of creation and modification date by providing a `created` and a `modified` property along with its accessor methods as well as appropriate lifecycleevent methods to set creation and modification date on persist and modification date on update. So this has not to be implemented in every entity class on it's own. In addition this class defines an abstract class `getTextIdentifier()` that is very similar to an `getString()` method and that should return a suitable string representation of the entity.
- `MBInterleavedChecksumEntity` creates a simple checksum from provided record data as well as an interleaved checksum from provided record data alongside with data of the forerunning record (the predecessor). It defines an abstract method `getInterityData()` that needs to be implemented in the concrete entity class and returns an array of data that should be included within the checksum. This class also saves the id of it's predecessor into the current record.

Repository class
----------------

[](#repository-class)

- `MBInterleavedChecksumEntityRepository` provides the `findLatest()` method that returns the latest record within the corresponding table. Currently it does this by id (what means that this only works as intended if id is incremental).

Service class
-------------

[](#service-class)

- `IntegrityService` provides the `getValidatedEntities()` method that returns a list of all entities with their validity checked. This result is similar to the repository's method `findAll()` but with validation and is needed as validation is a tiime consuming process and should not happen on every findAll()` operation.

Usage
-----

[](#usage)

To use `MBBaseEntity` add the following fields to the table that is related to the entity.

- `created (DateTime)`
- `modified (DateTime)`

Extend the `MBBaseEntity` within the concrete entity class. Add a `getTextIdentifier()` method to the concrete class that returns a suitable string representation of the entity.

To use `MBInterleavedChecksumEntityRepository` do everything that has to be done for using `MBBaseEntity` (this is because `MBInterleavedChecksumEntityRepository` extends `MBBaseEntity`) and add the following fields to the table that is related to the entity.

- `simple_checksum (varchar(1000))`
- `interleaved_checksum (varchar(1000))`
- `predecessor_id (int)`

Extend the `MBInterleavedChecksumEntityRepository` within the concrete entity class. Add a `getInterityData()` method to the concrete class that returns an array of data that should be part of the simple and interleaved checksum.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~44 days

Recently: every ~55 days

Total

6

Last Release

2771d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38279818?v=4)[multibytesystems](/maintainers/multibytesystems)[@multibytesystems](https://github.com/multibytesystems)

---

Top Contributors

[![omanshardt](https://avatars.githubusercontent.com/u/5845310?v=4)](https://github.com/omanshardt "omanshardt (10 commits)")[![multibytesystems](https://avatars.githubusercontent.com/u/38279818?v=4)](https://github.com/multibytesystems "multibytesystems (1 commits)")

---

Tags

doctrinezendentity

### Embed Badge

![Health badge](/badges/multibytesystems-mb-components/health.svg)

```
[![Health](https://phpackages.com/badges/multibytesystems-mb-components/health.svg)](https://phpackages.com/packages/multibytesystems-mb-components)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8405.5M96](/packages/laravel-doctrine-orm)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58825.2M48](/packages/scienta-doctrine-json-functions)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4627.0M12](/packages/fresh-doctrine-enum-bundle)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4535.7M4](/packages/martin-georgiev-postgresql-for-doctrine)

PHPackages © 2026

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