BOSON Help

Application Events

The application will automatically emit the following events (and intentions) during its lifecycle.

To subscribe to events, you can use direct access to the event listener.

$app->addEventListener(Event::class, function (Event $e) { var_dump($e); });

The application instance also supports a more convenient and simple way of registering events using the on() method.

$app->on(function (Event $event): void { var_dump($event); });

Starting Intention

An Boson\Event\ApplicationStarting intention to start the application.

class ApplicationStarting<Application>

Started Event

An Boson\Event\ApplicationStarted event fired after the application has been launched and the Boson\Event\ApplicationStarting intention has not been cancelled.

class ApplicationStarted<Application>

Stopping Intention

An Boson\Event\ApplicationStopping intention to stop the application.

class ApplicationStopping<Application>

Stopped Event

An Boson\Event\ApplicationStopped event fired after the application has been stopped and the Boson\Event\ApplicationStopping intention has not been cancelled.

class ApplicationStopped<Application>
17 June 2025