public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }
public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }
public function fireEvent ( string $ event ) : void { $ this -> log -> debug ( 'Event {event} has been fired.' , [ 'event' => $ event ] ) ; foreach ( $ this -> event_handlers as $ handler ) { /** @var EventHandler $handler */ if ( $ event === $ handler -> getEvent ( ) ) { $ handler -> execute ( ) ; } } }
Register a callback to be run before the renderer is called

@param string $event The name of the event being fired

@throws \Exception
Register a callback to be run before the renderer is called