2017 © Pedro Peláez
 

library ioc

PHP IOC容器

image

lisao/ioc

PHP IOC容器

  • Sunday, June 24, 2018
  • by yuanxin32323
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

What's This?

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

获取实例

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

The Versions

24/06 2018

dev-master

9999999-dev

PHP IOC容器

  Sources   Download

MIT

The Requires

  • php >=5.6

 

by Li Sao

ioc

24/06 2018

1.0

1.0.0.0

PHP IOC容器

  Sources   Download

MIT

The Requires

  • php >=5.6

 

by Li Sao

ioc