PHPackages                             oranfry/registers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. oranfry/registers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

oranfry/registers
=================

2.0.0(1mo ago)0310PHPPHP &gt;=8.1

Since Aug 6Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (6)Used By (0)

Registers
=========

[](#registers)

Simple framework for creating object registers.

Useful of you want to get an object from anywhere, without creating a new instance if one already exists, and without creating an instance unless and until it is needed.

It also introduces an alias layer to referring to classes, meaning you could easily swap implementations by changing one line of code.

Usage
-----

[](#usage)

First implement a register:

```
use Registers\Register;

Register::register('wozzle', [
    'big' => \Acme\Wozzles\Big::class,
    'small' => \Acme\Wozzles\Small::class,
]);
```

Now you can grab a big or small wozzle from anywhere:

```
use Registers\Register;

Register::::load('wozzle', 'big');

$wozzle->fizzle();

if (Register::::available('wozzle', 'medium')) {
    Register::::load('wozzle', 'medium')->wiggle();
}

echo "All available wozzles:\n";
var_dump(Register::::available('wozzle'));
echo "";
```

If this is the first time asking for a big wozzle, a new instance will be created and saved in the register.

Otherwise, the instance already in the register will be returned for your use.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance58

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

5

Last Release

33d ago

Major Versions

1.2.0 → 2.0.02026-07-15

### Community

Maintainers

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

---

Top Contributors

[![oranfry](https://avatars.githubusercontent.com/u/6006655?v=4)](https://github.com/oranfry "oranfry (5 commits)")

### Embed Badge

![Health badge](/badges/oranfry-registers/health.svg)

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

###  Alternatives

[hi-folks/data-block

Data class for managing nested arrays and JSON data.

1453.3k](/packages/hi-folks-data-block)[t3docs/site-package

Site Package - This site package is an example used to understand the TYPO3 Site Package Tutorial.

1417.0k](/packages/t3docs-site-package)

PHPackages © 2026

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