成都创新互联网站制作重庆分公司

设计模式之----------适配器模式

adaptee=$adaptee;
		
	}
	
	public function simpleFunction1(){
		echo $this->adaptee->simpleFunction1();
		
	}
	
	public function simpleFunction2(){
		echo 'Adapter Simple ';
		
	}
}

class client{
	public static function main(){
		$adaptee = new Adaptee();
		$adapter = new Adapter($adaptee);
		$adapter->simpleFunction1();
		$adapter->simpleFunction2();
	}

}

client::main();

文章名称:设计模式之----------适配器模式
网站URL:http://cxhlcq.com/article/gjdohc.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部