php中的设计模式之代理模式
程序员文章站
2022-06-15 21:25:26
...
subject = $RealSubject ; } public function killPeople(){ if(is_null($this->subject)){ $this->subject = $RealSubject ; } $this->subject->killPeople(); }}// client 代理人武则天$wuzetian = new ProxySubject();$wuzetian->killPeople();