PHPackages                             webmgine/object-manager - 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. webmgine/object-manager

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

webmgine/object-manager
=======================

Static class to load objects with dependencies injection

2.0.1(6y ago)041MITPHPPHP &gt;=7.4.0

Since Feb 15Pushed 6y agoCompare

[ Source](https://github.com/webmgauthier/Webmgine-ObjectManager)[ Packagist](https://packagist.org/packages/webmgine/object-manager)[ RSS](/packages/webmgine-object-manager/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (9)Used By (0)

Webmgine - ObjectManager
========================

[](#webmgine---objectmanager)

Static class to load objects with dependencies injection

Requirements
------------

[](#requirements)

PHP &gt;=7.4 This class need composer autoload

Getting Started
---------------

[](#getting-started)

```
require  . '/vendor/autoload.php';

```

To load an object, just call the **getObject** function and set namespace as string using / instead of \\

```
use Webmgine\ObjectManager;
ObjectManager::getObject('Namespace/As/String');

```

or

```
\Webmgine\ObjectManager::getObject('Namespace/As/String');

```

Options
-------

[](#options)

### Custom arguments (data)

[](#custom-arguments-data)

You can manually set arguments in a array using **array key** =&gt; **construct var name** association

```
namespace ExempleNamespace;

class ExempleClass{

    public function __construct(
        \ExempleNamespace\ExempleClass2 $demo1,
        string $demo2
    ) {
        // $demo1 -> Instance of \ExempleNamespace\ExempleClass2 class
        // $demo2 -> 'exemple text' (use custom argument from array associated by the array key and the var name)
    }
}

```

```
ObjectManager::getObject('ExempleNamespace/ExempleClass', ['data' => ['demo2' => 'exemple text']]);

```

### Singletons (singleton)

[](#singletons-singleton)

You can set singleton to true, this will make the object manager return an existing object if any

```
ObjectManager::getObject('ExempleNamespace/ExempleClass', ['singleton' => true]);

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 87.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 ~55 days

Recently: every ~84 days

Total

8

Last Release

2305d ago

Major Versions

1.0.5 → 2.0.02020-03-07

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

1.0.5PHP &gt;=7.2.0

2.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47616936?v=4)[webmgauthier](/maintainers/webmgauthier)[@webmgauthier](https://github.com/webmgauthier)

---

Top Contributors

[![webmgauthier](https://avatars.githubusercontent.com/u/47616936?v=4)](https://github.com/webmgauthier "webmgauthier (14 commits)")[![mgauthiereffenti](https://avatars.githubusercontent.com/u/53188104?v=4)](https://github.com/mgauthiereffenti "mgauthiereffenti (2 commits)")

### Embed Badge

![Health badge](/badges/webmgine-object-manager/health.svg)

```
[![Health](https://phpackages.com/badges/webmgine-object-manager/health.svg)](https://phpackages.com/packages/webmgine-object-manager)
```

###  Alternatives

[silverstripe/subsites

Run multiple sites from a single SilverStripe install.

64400.9k21](/packages/silverstripe-subsites)[ayesh/php-timer

High-resolution and monotonic stop-watch for all your needs. Supports timer start, pause, resume, stop, read, and minimal conversion.

25235.3k12](/packages/ayesh-php-timer)

PHPackages © 2026

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