输入banner图图片脚本导航/分类

php中的设计模式之策略模式

strategy = $strategy;	}		// 开始策略	public function startStrategy(){		$this->strategy->handle(); 	}	}$people = 'teacher';switch($people){	case 'student' : $strategy = new studentStrategy () ;break;	case 'teacher' : $strategy = new teacherStrategy () ;break;}$safePeople = new TestCheck();$safePeople ->setStrategy($strategy);$safePeople ->startStrategy();