PHPackages                             autoframe/design-patterns - 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. autoframe/design-patterns

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

autoframe/design-patterns
=========================

PHP design patterns. Singleton...

1.0.2(2y ago)03705MITPHPPHP &gt;=7.4

Since Jun 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/autoframe/design-patterns)[ Packagist](https://packagist.org/packages/autoframe/design-patterns)[ Docs](https://github.com/autoframe)[ RSS](/packages/autoframe-design-patterns/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (5)

Autoframe is a low level framework that is oriented on SOLID flexibility
------------------------------------------------------------------------

[](#autoframe-is-a-low-level-framework-that-is-oriented-on-solid-flexibility)

[![Build Status](https://github.com/autoframe/design-patterns/workflows/PHPUnit-tests/badge.svg?branch=main)](https://github.com/autoframe/design-patterns/actions?query=branch:main)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Packagist Version](https://camo.githubusercontent.com/74ce21a7b1e3258adf72a56e6821d39ee2a1c00b40d7e6b7582fed855a6ef7c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6175746f6672616d652f64657369676e2d7061747465726e733f6c6162656c3d7061636b6167697374253230737461626c65)](https://camo.githubusercontent.com/74ce21a7b1e3258adf72a56e6821d39ee2a1c00b40d7e6b7582fed855a6ef7c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6175746f6672616d652f64657369676e2d7061747465726e733f6c6162656c3d7061636b6167697374253230737461626c65)[![Downloads](https://camo.githubusercontent.com/64ed106a2843028301292ddfed522677eb3bf3a618541664f970ebb837b129ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6175746f6672616d652f64657369676e2d7061747465726e732e737667)](https://packagist.org/packages/autoframe/design-patterns)

*PHP design patterns*

### Singleton

[](#singleton)

- Namespace Autoframe\\DesignPatterns\\Singleton
    - abstract class AfrSingletonAbstractClass
        - implements AfrSingletonInterface
        -
    - AfrSingletonTrait provides interface implementation
    - Methods:
        - final public getInstance: self
        - public hasInstance: bool
        - final protected \_\_construct: self
        - final public \_\_wakeup: @throws AfrException
        - final public \_\_clone: @throws AfrException

### Array Access Singleton object instance

[](#array-access-singleton-object-instance)

- Namespace Autoframe\\DesignPatterns\\SingletonArray
    - abstract class AfrSingletonArrAbstractClass
        - implements AfrSingletonInterface, ArrayAccess, Iterator, Countable
        - use AfrObjectArrayAccessTrait

### Array Access object instance

[](#array-access-object-instance)

- Namespace Autoframe\\DesignPatterns\\ArrayAccess
    - class AfrObjectArrayAccessClass

        - implements ArrayAccess, Iterator, Countable
    - AfrObjectArrayAccessTrait implements ArrayAccess, Iterator, Countable

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

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

Total

3

Last Release

774d ago

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8.0

1.0.2PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![autoframe](https://avatars.githubusercontent.com/u/34517931?v=4)](https://github.com/autoframe "autoframe (6 commits)")

---

Tags

singletonAbstract SingletonSingleton traitobject array accessobject array iteratorobject array counterSingleton array object

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/autoframe-design-patterns/health.svg)

```
[![Health](https://phpackages.com/badges/autoframe-design-patterns/health.svg)](https://phpackages.com/packages/autoframe-design-patterns)
```

###  Alternatives

[florianwolters/component-util-singleton

The Singleton (and Registry of Singletons a.k.a. Multiton) design pattern as a PHP component.

13175.8k5](/packages/florianwolters-component-util-singleton)

PHPackages © 2026

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