028-86922220

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

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

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();

文章标题:设计模式之----------适配器模式
本文来源:http://www.tsicrk.com/article/gjdohc.html

其他资讯

让你的专属顾问为你服务

0.8364s