为了解决对象存储的问题(降低耦合),我们有时要将创建的对象与变量进行绑定,也就是依赖注入(Ioc),要使用某个对象时,不用重新实例化,而是直接使用与之绑定的变量。
利用register或者betchRegister(批量注册)把对象实例绑定到$_instance数组上
获取config对象只要先实例化一次Di,
① Di::$Di->config(调用了__get魔术方法)。
②Di::$Di['config'](继承了ArrayAccess)