摘要:
装饰器模式_weapon = $weapon; } public function cost(){ return $this->_weapon->cost() + $this->_price; } public function descript... 阅读全文
posted @ 2015-04-14 16:15
ikasa007
阅读(209)
评论(0)
推荐(0)
摘要:
适配器模式'; }}//类适配器模式class Adapter implements Target{ private $adatee; public function __construct(Adatee $adatee){ $this->adatee = $adat... 阅读全文
posted @ 2015-04-14 15:19
ikasa007
阅读(204)
评论(0)
推荐(0)
摘要:
观察者模式_observers[] = $sub; } //外部统一调用 public function trigger(){ if(!empty($this->_observers)){ ... 阅读全文
posted @ 2015-04-14 14:26
ikasa007
阅读(242)
评论(0)
推荐(0)
摘要:
策略模式getTrafic(); } } $trafics = new Trafic(); $trafics->useTrafic(new bikeStrategy());?> 阅读全文
posted @ 2015-04-14 10:30
ikasa007
阅读(129)
评论(0)
推荐(0)
浙公网安备 33010602011771号