sFire lets you define multiple modules. This way you can separate logic and code between multiple domains. In the routes.php you can define which URL needs to go to which module.
Every module has its own directory in the "modules" directory containing the following directories:
config
controllers
helpers
models
tbtable
entity
mapper
translations
validators
views
In the "config" directory you can find the "config.php" to configure a specific module.
sFire lets you retrieve the current module by doing:
use sFire\Routing\Router;
$module = Router :: getRoute() -> getModule();
echo $module; //Ouput similar to: "App"
Imagine that the code below is in the "config.php":
return [
'database' => [
'host' => '127.0.0.1',
'username' => 'username',
'password' => 'password',
'db' => 'database',
]
];
To obtain this config, you first need to determine the current module and select the config:
use sFire\Routing\Router;
use sFire\Config\Config;
$module = Router :: getRoute() -> getModule();
$config = Config :: get([$module, 'database']);
print_r($config);