References Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community github GitHub github Get Started arrow_up_right
Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community

Application

Application Configuration Events Dialog API OS Info API CPU Info API Getting Started Architecture Application Window WebView Deployment Components Framework Integrations Examples Community

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);
});

More information about events can be found in the events documentation.

Starting Intention

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

class ApplicationStarting<Application>

If it is cancelled, the application will not be launched.

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>

If it is cancelled, the application will not be stopped.

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>
github discord telegram Get started Documentation Contribution Guide License Release Notes BOSON PHP © 2025. All Rights Reversed.