Esempio n. 1
0
 public function handleRequest(IStudent $student)
 {
     if ($this->state === $student->getState()) {
         $this->process($student);
     } else {
         echo '请求上级批复...', PHP_EOL;
         $this->nextHandler->handleRequest($student);
     }
 }
Esempio n. 2
0
 public function process(IStudent $student)
 {
     echo '请假信息:', $student->getMessage(), PHP_EOL;
     echo '校长批复...', PHP_EOL;
 }