$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某个方法。如何执行?一路下来的。

解决方案 »

  1.   


    是在 $this -> do中执行 $this -> co某个方法。不同类中啊。一路下来的。
    $this->co->method();
    执行$this->co中的方法没问题
      

  2.   

    上面写错了。应该是说$this->co->method();
    执行$this->cd中的方法没问题现在是要倒过来。在$this -> do中执行$this -> co的方法。
      

  3.   

    MVC。几个类。分析url、执行控制器、数据层类、模板类、