public function event($name, ...$args)
{
if ($this->addThisToEvents) {
array_unshift($args, $this);
}
if (isset($this->eventHandlers[$name])) {
$this->lastEventName = $name;
foreach ($this->eventHandlers[$name] as $cb) {
if ($cb(...$args) === true) {
return $this;
}
}
}
return $this;
}