根据id得到对象实例
TODO 单实例间互相引用会是问题
public create ( string $id, array $construct_args = null, array $properties = null, callable $injector = null, callable $init = null ) : object | ||
$id | string | |
$construct_args | array | 构造函数的参数 |
$properties | array | 类属性, 覆盖配置文件中的属性 |
$injector | callable | fun($src), 获取注入值的方法 |
$init | callable | fun($inst, &$got) 初始化实例, 在创建后, 调用构造函数前 |
Результат | object |