phprs\util\IoCFactoryEx::create PHP Method

create() public method

根据id创建对象(的容器)实例
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) 初始化实例, 在创建后, 调用构造函数前
return object
    public function create($id, $construct_args = null, $properties = null, $injector = null, $init = null)
    {
        $meta = $this->getMetaInfo($this->getClassName($id));
        if (isset($meta['cache'])) {
            return new IoCObjectWrap($this, $id, $construct_args, $properties, $injector, $init);
        }
        return $this->createRawObject($id, $construct_args, $properties, $injector, $init);
    }