400 028 6601

建站动态

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

php设计模式之——建造者模式

_age = $age;
	}
	
	public function setName($name){
		$this->_name = $name;
	}
	
	public function setProv($prov){
		$this->_prov = $prov;
	}
	
	public function getMan(){
		echo $this->_age.$this->_name.$this->prov;
	}
}

class Building{
	protected $man = '';
	public function __construct(){
		$this->man = new UserInfo();
	}
	
	public function buildman($array){
		$this->man->setAge($array['age');
		$this->man->setAge($array['name');
		$this->man->setAge($array['prov');
		
	}
	
	public function getman(){
		$this->man->getMan();
	}
}

标题名称:php设计模式之——建造者模式
分享URL:http://mbwzsj.com/article/jcehod.html

其他资讯

让你的专属顾问为你服务