135-1821-9792

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

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.wtcwzsj.com/article/gjdohc.html

其他资讯



Copyright © 2009-2022 www.wtcwzsj.com 青羊区广皓图文设计工作室(个体工商户) 版权所有 蜀ICP备19037934号