开发者

How is this design pattern called?

开发者 https://www.devze.com 2022-12-09 04:44 出处:网络
How do you call this design pattern? class Foo { protected $delegates = array(); //... public function __call($meth开发者_如何学运维od,$argv) {

How do you call this design pattern?

class Foo {
   protected $delegates = array();
   //...
   public function __call($meth开发者_如何学运维od,$argv) {
      //call $this->$something->$method($argv), where $something is a mapping from $this->delegates
   }
}

I can speculate, but I'm not sure, so I wanted to ask you.


The aptly named Delegation pattern?

0

精彩评论

暂无评论...
验证码 换一张
取 消