Files
luos/workflow/engine/methods/dbConnections/rootDbConnections.php

23 lines
641 B
PHP
Raw Normal View History

2010-12-02 23:34:41 +00:00
<?php
2021-04-22 16:51:58 -04:00
2010-12-02 23:34:41 +00:00
/**
2021-04-22 16:51:58 -04:00
* This is an additional configuration to load all connections if exist in a particular process
2010-12-02 23:34:41 +00:00
*/
2021-04-22 16:51:58 -04:00
$dbHash = @explode(SYSTEM_HASH, G::decrypt(HASH_INSTALLATION, SYSTEM_HASH));
$host = $dbHash[0];
$user = $dbHash[1];
$pass = $dbHash[2];
$dbName = DB_NAME;
2021-04-22 16:51:58 -04:00
$pro = include(PATH_CORE . "config/databases.php");
$port = (!empty(config('database.connections.workflow.port'))) ? config('database.connections.workflow.port') : 3306;
2021-04-22 16:51:58 -04:00
$pro['datasources']['root'] = [];
$pro['datasources']['root']['connection'] = "mysql://$user:$pass@$host:$port/$dbName?encoding=utf8";
$pro['datasources']['root']['adapter'] = "mysql";
return $pro;