PHPackages                             delboy1978uk/person - 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. delboy1978uk/person

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

delboy1978uk/person
===================

A persistable person entity, repository, and service.

v6.8.2(8mo ago)32.9k1[1 issues](https://github.com/delboy1978uk/person/issues)2MITPHPPHP ^8.2CI passing

Since Oct 31Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/delboy1978uk/person)[ Packagist](https://packagist.org/packages/delboy1978uk/person)[ RSS](/packages/delboy1978uk-person/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (59)Used By (2)

person
======

[](#person)

[![Build Status](https://camo.githubusercontent.com/635a1e0d7d244990b15fc77ae7ae5f3770e6659773f4e6737c0ad03fbf3cfb8f/68747470733a2f2f7472617669732d63692e6f72672f64656c626f7931393738756b2f706572736f6e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/delboy1978uk/person) [![Code Coverage](https://camo.githubusercontent.com/210ac854790213ce890e31dd4ee6d6cc3deabc274b290a7fa3d823d199c05485/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f706572736f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/person/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a18e843066edcd526555ac226ff6a6d497cd709af0a63ca1f4f9ccdf344a9728/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f706572736f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/person/?branch=master)
A persistable Person Entity, Collection, Repository, and Service, written in PHP. ##Installation Install via composer into your project:

```
composer require delboy1978uk/person

```

Setup and Usage
---------------

[](#setup-and-usage)

You can use delboy1978uk/common, which contains Doctrine2 ORM for database persistance, and Pimple as a dependency injection container. You can register the Person DIC items using the Del\\Person\\PersonPackage object. See delboy1978uk/common for details.

```
use Del\Commohn\ContainerService;
use Del\Person\PersonPackage;

$package = new PersonPackage();
ContainerService::getInstance()->registerToContainer($config);
```

The Person Entity
-----------------

[](#the-person-entity)

The `$date` variable is a DateTime object. `$country` is a a Del\\Entity\\Country object.

```
use Del\Person\Entity\Person;

$del = new Person();
$del->setFirstname('Derek')
    ->setMiddlename('Stephen')
    ->setLastname('McLean)
    ->setAka('Del Boy')
    ->setDob($date)
    ->setBirthplace('Glasgow, Scotland')
    ->setCountry($country);
```

The Person Collection
---------------------

[](#the-person-collection)

Or people, as we might like to call it.

Del\\Person\\Collection\\PersonCollection extends ArrayIterator and contains the following (additional) methods:

```
$collection->update($person); // Updates the entity in the collection with fresh details
$collection->append($person); // Adds an entity to the collection
$collection->current(); // Retrieves the currently selected Person object
$collection->findKey($person); // Retrieves the array offset key for any Person in the collection
$collection->findById($id); // Retrieves a Person from the collection by their Id
```

The Person Service
------------------

[](#the-person-service)

Del\\Person\\Service\\PersonService contains a few methods for dealing with Person objects.

```
$svc->createFromArray($data); // Person object factory method accepting an array
$svc->toArray($person); // Pass a Person, receive an array
$svc->savePerson($person); // Saves a Person (adds or updates) to the database
$svc->getRepository(); // Gets the Person Repository
$svc->findByCriteria($criteria); // Finds results based upon your Criteria (see below)
$svc->findOneByCriteria($criteria); // As above but for a single result
```

The Person Criteria
-------------------

[](#the-person-criteria)

Set the criteria for your searches using this object.

```
use Del\Person\Criteria\PersonCriteria;

$criteria = new PersonCriteria();
$criteria->setFirstname('Derek');
$criteria->setLastname('McLean');

$results = $svc->findByCriteria($criteria); // array of Person objects
```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance54

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.5% 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 ~67 days

Recently: every ~5 days

Total

55

Last Release

246d ago

Major Versions

v1.0.0 → v2.0.02015-11-15

v2.0.3 → v3.0.02016-01-07

v3.0.6 → v4.0.02016-03-20

v4.0.5 → v5.0.02018-06-22

v5.0.0 → v6.0.02019-09-14

PHP version history (2 changes)v6.5.2PHP ^8.0

v6.6.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![delboy1978uk](https://avatars.githubusercontent.com/u/2684575?v=4)](https://github.com/delboy1978uk "delboy1978uk (128 commits)")[![darkain](https://avatars.githubusercontent.com/u/2524251?v=4)](https://github.com/darkain "darkain (1 commits)")[![NightScript370](https://avatars.githubusercontent.com/u/18664762?v=4)](https://github.com/NightScript370 "NightScript370 (1 commits)")

### Embed Badge

![Health badge](/badges/delboy1978uk-person/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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