Browse Source

expose database config

develop
Robin Thoni 8 years ago
parent
commit
607ef1cee4
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/Utils/Controller/LuticateApplication.php

+ 6
- 1
src/Utils/Controller/LuticateApplication.php View File

@@ -84,11 +84,16 @@ class LuticateApplication implements MessageComponentInterface
84 84
         
85 85
         $this->_router->setup();
86 86
     }
87
+
88
+    public function getDatabases()
89
+    {
90
+        return $this->_config['databases'];
91
+    }
87 92
     
88 93
     public function setupDatabases()
89 94
     {
90 95
         $capsule = new Capsule;
91
-        foreach ($this->_config['databases'] as $database) {
96
+        foreach (static::getDatabases() as $database) {
92 97
 
93 98
             $default = [
94 99
                 'name'      => 'mydb',

Loading…
Cancel
Save