浏览代码

expose database config

develop
Robin Thoni 8 年前
父节点
当前提交
607ef1cee4
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      src/Utils/Controller/LuticateApplication.php

+ 6
- 1
src/Utils/Controller/LuticateApplication.php 查看文件

@@ -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',

正在加载...
取消
保存