PHPackages                             clean/registry - 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. clean/registry

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

clean/registry
==============

Simple registry pattern implementation

1.0.1(10y ago)324.9k1MITPHP

Since Nov 6Pushed 6y ago2 watchersCompare

[ Source](https://github.com/clean/registry)[ Packagist](https://packagist.org/packages/clean/registry)[ RSS](/packages/clean-registry/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Clean\\Registry
===============

[](#cleanregistry)

[![Build Status](https://camo.githubusercontent.com/4f9b81fff8a412a5fa8ccd581a37d0ae63223d7571fbac4f816fe42e558f37a1/68747470733a2f2f7472617669732d63692e6f72672f636c65616e2f72656769737472792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/clean/registry)[![Code Climate](https://camo.githubusercontent.com/2004223433fb23213e60e80d8101210d41ec91364be34477275c567be80815fd/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f636c65616e2f72656769737472792f6261646765732f6770612e737667)](https://codeclimate.com/github/clean/registry)[![Test Coverage](https://camo.githubusercontent.com/32c08edc28d48f1a1f4d3b0c7dfe50494c92bf28c2316b554ff2aaa5ea3bf2f9/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f636c65616e2f72656769737472792f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/clean/registry/coverage)[![Issue Count](https://camo.githubusercontent.com/771fa741fe30c0040a74599b0afc277247a5c834c2e247f21b6842630e5866f3/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f636c65616e2f72656769737472792f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/clean/registry)

Basic implementation of registry pattern that implement a central storage for objects often used throughout the application.

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

[](#installation)

via [Composer](https://packagist.org/packages/clean/registry):

```
"require": {
  "clean/registry": "*"
}
```

Example of Usage
----------------

[](#example-of-usage)

```
$registry = new Registry()

$registry->set('var1', 1);

$var1 = $registry->get('var1');

if ($registry->has('var1')) {
    ...
}
```

or you can extend any class with `ReigistryTrait` to add registry methods to it

```
class MyClass {
	use \Clean\Registry\RegistryTrait;
}
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

3890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21d3fe3ceb74869ffa1dd2ca9aac14d6df3e9e4209cfa8ed9c602875d590959b?d=identicon)[romannowicki](/maintainers/romannowicki)

---

Top Contributors

[![peengle](https://avatars.githubusercontent.com/u/305179?v=4)](https://github.com/peengle "peengle (1 commits)")

---

Tags

registry

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clean-registry/health.svg)

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

###  Alternatives

[sylius/registry

Services registry.

6211.7M65](/packages/sylius-registry)[bnomei/autoloader-for-kirby

Helper to automatically load various Kirby extensions in a plugin

185.7k2](/packages/bnomei-autoloader-for-kirby)

PHPackages © 2026

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