135-1821-9792

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设计模式之——建造者模式
文章起源:http://wtcwzsj.com/article/jcehod.html

其他资讯



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