Skip to content
Snippets Groups Projects
Commit c30cd21b authored by Alexandre Caillot's avatar Alexandre Caillot :fox:
Browse files

Modify : Module. Generate SQL components and set them into the container at...

Modify : Module. Generate SQL components and set them into the container at the call of 'boot' method.
parent a2ebeaa0
No related branches found
No related tags found
No related merge requests found
Pipeline #1534971979 passed
......@@ -24,7 +24,7 @@ class SQLConstant
* Config key : Database
* Used to selects the SQL connection on which the query will be executed.
*/
public const CONFIG_DATABASES = 'storage.sql.databases';
public const CONFIG_DATABASES = 'Storage.SQL.Databases';
# --------------------------------
# Container
......
......@@ -22,6 +22,7 @@ use Luna\Component\File\Exception\Writer\FileWriterException;
use Luna\Component\File\Manager\FileManager;
use Luna\Component\Manager\ValueManager;
use Luna\Component\Module\AbstractModule;
use Luna\SQL\Constant\SQLConstant;
class Module extends AbstractModule
{
......@@ -104,6 +105,12 @@ class Module extends AbstractModule
// ----------------
// Process
// Generate SQL components
$sqlManager = new SQLManager();
// Set SQL components in the container
$container->set(SQLConstant::CONTAINER_SQL_MANAGER, $sqlManager);
// Register module configuration
$config->load(
path : $configDir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment