Ejemplo n.º 1
0
 public static function test()
 {
     $subject = new Subject();
     $subject->attach(new Observer1());
     $subject->attach(new Observer2());
     $subject->post();
     //输出:数据量加1 积分加10
 }