$a = new A()$a 中实例化B类给bo属性 // $this -> bo = new B()
在$this -> bo 中又实例化C类给co属性 // $this -> co = new C()
在$this -> co 再实例化D类给do属性 // $this -> do = new D()
现在问题是在 $this -> do中执行 $this -> co某个方法。如何执行?一路下来的。
在$this -> bo 中又实例化C类给co属性 // $this -> co = new C()
在$this -> co 再实例化D类给do属性 // $this -> do = new D()
现在问题是在 $this -> do中执行 $this -> co某个方法。如何执行?一路下来的。
是在 $this -> do中执行 $this -> co某个方法。不同类中啊。一路下来的。
$this->co->method();
执行$this->co中的方法没问题
执行$this->cd中的方法没问题现在是要倒过来。在$this -> do中执行$this -> co的方法。