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
=================

1.2.0(1y ago)0282PHPPHP &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 today

READMEChangelogDependenciesVersions (5)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

29

—

LowBetter than 57% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

4

Last Release

678d ago

### 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

[octopush/sms-api

Octopush - Send SMS like a PRO

1799.0k1](/packages/octopush-sms-api)[cedaro/dequeue-jquery-migrate

A WordPress plugin to remove the jquery-migrate.js script dependency.

296.0k](/packages/cedaro-dequeue-jquery-migrate)

PHPackages © 2026

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