The config.php is a configuration file that is unique for every module. It is a file where you store i.e. database credentials in as an Array. This file allows the user to truly customize it to the needs of the application.
The config.php is a file stored in "modules/{YOUR-MODULE-NAME}/config/" that returns an Array with user defined data. This data can be whatever you want. For example database credentials or salts.
<?php
return [
'database' => [
'host' => '127.0.0.1',
'username' => 'username',
'password' => 'password',
'db' => 'database',
]
];
?>
To use the config in other files such as controllers and mappers, you first need to know which module the current module is. Then, you can use the get method of sFire\Config\Config to display the config.
use sFire\Routing\Router;
use sFire\Config\Config;
//Retrieve the current module
$module = Router :: getRoute() -> getModule();
//Retrieve the config for the current module
$config = Config :: get([$module, 'database']);
print_r($config);