\Imi\BeanContainer

Summary

Methods
Properties
Constants
__construct()
get()
has()
bind()
getBinds()
newSubContainer()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$singletonObjects
$beanParser
$binds
N/A

Properties

$singletonObjects

$singletonObjects : array

单例对象们

Type

array

$binds

$binds : array

绑定列表

Type

array

Methods

__construct()

__construct(  $binds = array()) 

Parameters

$binds

get()

get(string  $id) : mixed

从容器中获取实例对象,如果不存在则实例化

Parameters

string $id

标识符

Throws

\Imi\Bean\NotFoundExceptionInterface

没有找到对象

\Imi\Bean\ContainerExceptionInterface

检索时出错

Returns

mixed —

Entry.

has()

has(string  $id) : boolean

实例对象是否存在

Parameters

string $id

标识符

Returns

boolean

bind()

bind(string  $name, string  $class) : void

绑定名称和类名

Parameters

string $name
string $class

getBinds()

getBinds() : array

Get 绑定列表

Returns

array

newSubContainer()

newSubContainer() : static

返回一个新的容器对象,容器内无对象,仅有列表关联

Returns

static