PHPackages                             matico/simple-php-di - 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. matico/simple-php-di

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

matico/simple-php-di
====================

SimplePHPDI

04PHP

Since Mar 15Pushed 7y agoCompare

[ Source](https://github.com/mactiencong/SimplePHPDI)[ Packagist](https://packagist.org/packages/matico/simple-php-di)[ RSS](/packages/matico-simple-php-di/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/fd97b4dfb3c5b59c972522284f99c4078fa574e430892b2c1fe3ac8d011c1a76/68747470733a2f2f7472617669732d63692e6f72672f6d61637469656e636f6e672f53696d706c6550485044492e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mactiencong/SimplePHPDI)

The simple Dependency Injection lib for PHP (5.3.x ~)
=====================================================

[](#the-simple-dependency-injection-lib-for-php-53x-)

How to work
===========

[](#how-to-work)

1. Inject annotations

- @Inject Inject a object instance normaly

```
/**
 *
 * @author matico
 * @Inject Address
 * @Inject Skill
 *
 */
class Developer {
}

```

- @InjectSingleton Inject a singleton object

```
/**
 *
 * @author matico
 * @InjectSingleton Country
 */
class Address {
}

```

```
$maticoDeveloper = DI::get('Developer', array('name'=>'matico'));
$maticoInfo = $maticoDeveloper->info();
$congmtDeveloper = DI::get('Developer', array('name'=>'congmt'));
$congmtInfo= $congmtDeveloper->info();
$this->assertSame('matico-VN-PHP', $maticoInfo);
$this->assertSame('congmt-VN-PHP', $congmtInfo);

```

View example detail in testcases

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![mactiencong](https://avatars.githubusercontent.com/u/24889966?v=4)](https://github.com/mactiencong "mactiencong (8 commits)")

### Embed Badge

![Health badge](/badges/matico-simple-php-di/health.svg)

```
[![Health](https://phpackages.com/badges/matico-simple-php-di/health.svg)](https://phpackages.com/packages/matico-simple-php-di)
```

###  Alternatives

[treeware/plant

13355.9k6](/packages/treeware-plant)

PHPackages © 2026

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