public function isCancelled()
{
if (!$this instanceof Cancellable) {
throw new \BadMethodCallException("Event is not Cancellable");
}
/** @var Event $this */
return $this->isCancelled === true;
}
/** * @param Event $event */ public function callEvent(Event $event) { if ($event instanceof Cancellable and $event->isCancelled() and $this->isIgnoringCancelled()) { return; } $this->timings->startTiming(); $this->executor->execute($this->listener, $event); $this->timings->stopTiming(); }