2017 © Pedro Peláez
 

project container

IOC服务容器管理组件

image

badtomcat/container

IOC服务容器管理组件

  • Wednesday, December 20, 2017
  • by badtomcat
  • Repository
  • 0 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

container

IOC服务容器管理组件, (*1)

composer require badtomcat/container, (*2)

$test = new \Badtomcat\Container();
$test->bind("foo",function (cls $ins)
{
    return $ins;
});
$this->assertEquals('foo',$test->make('foo')->bar);
$test->instance("value",123);
$this->assertEquals(123,$test->make('value'));
$this->assertTrue($test->bound("foo"));
$test->bind("bar",cls::class);
$this->assertInstanceOf(cls::class,$test->make("bar"));

[] 操作符执行的是make和bind, (*3)

The Versions

20/12 2017

dev-master

9999999-dev https://github.com/badtomcat/container

IOC服务容器管理组件

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Avatar badtomcat

container

20/12 2017

v0.0.1

0.0.1.0 https://github.com/badtomcat/container

IOC服务容器管理组件

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Avatar badtomcat

container