PHPackages                             lisao/ioc - 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. [Framework](/categories/framework)
4. /
5. lisao/ioc

ActiveLibrary[Framework](/categories/framework)

lisao/ioc
=========

PHP IOC容器

1.0(7y ago)0141MITPHPPHP &gt;=5.6

Since Jun 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yuanxin32323/ioc)[ Packagist](https://packagist.org/packages/lisao/ioc)[ RSS](/packages/lisao-ioc/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

What's This?
============

[](#whats-this)

这是一个为方便初级 phper 使用 php 实现自动依赖注入开发的库。

### 获取实例

[](#获取实例)

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

class a {

    public $b;

    public function __construct(\test\b $obj) {
        $this->b = $obj;
    }

    public function name() {
        echo 'a';
    }

}

class b {

    public function name() {
        echo 'b';
    }

}

$app = new \Lisao\Ioc\Ioc::getInstance('\test\a');
$app->b->name();

//输出
b
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2885d ago

### Community

Maintainers

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

---

Tags

ioc

### Embed Badge

![Health badge](/badges/lisao-ioc/health.svg)

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

###  Alternatives

[nette/di

💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.

92140.6M1.4k](/packages/nette-di)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[rdlowrey/auryn

Auryn is a dependency injector for bootstrapping object-oriented PHP applications.

7262.2M76](/packages/rdlowrey-auryn)[mouf/mouf

The Mouf PHP framework: an open-source PHP framework providing an easy way to download, install, use and reuse components, with a graphical user interface.

55146.0k17](/packages/mouf-mouf)[joomla/di

Joomla DI Package

15391.2k11](/packages/joomla-di)[duohuo/rapphp

php IOC&amp;AOP framework

531.0k1](/packages/duohuo-rapphp)

PHPackages © 2026

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