示例#1
0
 /**
  * @param ToDoItemDone $event
  */
 public function onToDoItemDone(ToDoItemDone $event)
 {
     $token = $this->openItems[$event->getIdentity()->getValue()]['token'];
     if ($token != null && $this->scheduler != null) {
         $this->scheduler->cancelSchedule($token);
     }
     unset($this->openItems[$event->getIdentity()->getValue()]);
     if (empty($this->openItems)) {
         $this->active = false;
     }
 }
示例#2
0
 /**
  * @EndSaga()
  * @SagaEventHandler(associationProperty = "identity")
  * @param ToDoItemDone $event
  */
 public function onToDoItemDone(ToDoItemDone $event)
 {
     $this->scheduler->cancelSchedule($this->expireToken);
     $this->expireToken = null;
 }