public function setEventHandler(EventInterface $handler, bool $static = false)
    {
        if ($static) {
            self::$globalEventHandler = $handler;
        }

        $this->eventHandler = $handler;

        return $this;
    }