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(8y ago)0141MITPHPPHP &gt;=5.6

Since Jun 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/yuanxin32323/ioc)[ Packagist](https://packagist.org/packages/lisao/ioc)[ RSS](/packages/lisao-ioc/feed)WikiDiscussions master Synced 2w 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 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

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

2930d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17340200?v=4)[离骚](/maintainers/yuanxin32323)[@yuanxin32323](https://github.com/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.

93041.5M1.6k](/packages/nette-di)[rdlowrey/auryn

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

7242.3M77](/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.

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

Joomla DI Package

15433.2k12](/packages/joomla-di)[duohuo/rapphp

php IOC&amp;AOP framework

521.0k1](/packages/duohuo-rapphp)

PHPackages © 2026

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