Configuration

Configuration in Framelix is done with configuration files that are default located in your userdata/xxx/private/01-app.php. This file is automatically generated when you have completed the setup. Here is the example file that this docs use right now.

Copy to clipboard

The config classes

Everything you configure for Framelix should be basically available through the Framelix/src/Config.php class. This class contains a lot of functions and properties that you can use, set or override in your own configuration file. Everything should have a proper doc comment that explain you what to do and how to set it.

Each module can have individual Config classes that can contain module specific config flags. Like for example the module config of this docs module.

Copy to clipboard

onRegister function

The onRegister static function will be executed, as soon as the module is loaded by the Framework. This configuration should set all default module settings that are required for the module. Like in this example, adding some compiler file groups and adding a default database connection.

Loading order of config files

Configuration files are loaded in the order of the modules that are registered. At really first, Framelix will be registered. After that, the FRAMELIX_MODULE will be registered (Which is the module the URL is mapped to in the docker .env).
You can register more modules by calling Framelix::registerModule in your own Config class.