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

Configuration

The application configuration class Boson\ApplicationCreateInfo is optional and serves as a convenient way to define default settings for initializing your app.

Application Name

The name of the application.

$appConfig = new Boson\ApplicationCreateInfo( 
    name: 'Example Application',
);

The value is optional and can be used for user needs, as well as for internal ones.

For example as a WindowClass (WNDCLASS.lpszClassName) identifier on Windows OS.

Intercepted Schemes

Defines custom schemes that your application can handle. These schemes allow you to create custom protocols for your application.

$appConfig = new Boson\ApplicationCreateInfo( 
    schemes: [ 'boson' ], // Default is empty array
);

More detailed information about the schemes is available on the Schemes API page.

Each registered scheme in this list will produce a SchemeRequestReceived intention when attempting to access a resource located at an address with this protocol.

Threads Count

Specifies the number of physical threads for the application. This affects how many concurrent operations your application can handle.

$appConfig = new Boson\ApplicationCreateInfo( 
    threads: 4, // Default is null
);

If the value is not specified (defined as null), the number of threads will correspond to the number of cores in the CPU.

Debug Mode

Enables or disables debug features, like dev tools and logging. When enabled, provides additional diagnostic information and developer tools.

$appConfig = new Boson\ApplicationCreateInfo( 
    debug: true, // Default is null
);

If the value is not specified, the debug mode will be set according to the current php.ini settings (depends on whether you are using the development php.ini settings)

The debug mode settings also affects the default settings of child configurations, such as developer tools (if they are not set explicitly).

Application Library

Specifies the path to a custom frontend library that should be loaded with the application.

$appConfig = new Boson\ApplicationCreateInfo( 
    library: __DIR__ . '/path/to/custom/library.dll', // Default is null
);

In most cases this is not required and the library will be selected automatically based on the current operating system and CPU architecture.

Quit On Close

Determines whether the application should terminate when all windows are closed. If set to false, the application will continue running in the background.

$appConfig = new Boson\ApplicationCreateInfo( 
    quitOnClose: true, // Default is true
);

Autorun

Responsible for automatic application launch. If autorun is set to false, you will need to launch the application yourself at the moment when it is needed.

$appConfig = new Boson\ApplicationCreateInfo( 
    autorun: false, // Default is true
);

Autorun will NOT work if the application has already been launched manually.

$app = new Boson\Application();

// After calling "run()" method, autorun is disabled
$app->run();

Autorun will NOT work if the application has been stopped manually.

$app = new Boson\Application();

// After calling "quit()" method, autorun is disabled
$app->quit();

Autorun will NOT work if any serious errors (errors or exceptions) occurred before launching.

$app = new Boson\Application();

// If errors occur before launch, autorun is disabled
trigger_error('smth happen');
github discord telegram Get started Documentation Contribution Guide License Release Notes BOSON PHP © 2025. All Rights Reversed.