|
@@ -66,12 +66,30 @@ class LuticateApplication implements MessageComponentInterface
|
66
|
66
|
|
67
|
67
|
$this->_config["databases"] = static::resolveDatabases($this->_config["databases"]);
|
68
|
68
|
|
|
69
|
+ if (!isset($this->_config['settings'])) {
|
|
70
|
+ $this->_config['settings'] = [];
|
|
71
|
+ }
|
|
72
|
+
|
69
|
73
|
$this->_clients = new \SplObjectStorage;
|
70
|
74
|
$this->_router = new LuRoute();
|
71
|
75
|
LuLog::setLogFilePath(__DIR__ . "/../../../../../../". $this->_config["logs"]);
|
72
|
76
|
self::$_app = $this;
|
73
|
77
|
}
|
74
|
78
|
|
|
79
|
+ public function getSetting($name)
|
|
80
|
+ {
|
|
81
|
+ $value = getenv("lu_setting_" . $name);
|
|
82
|
+ if ($value === false) {
|
|
83
|
+ if (isset($this->_config['settings'][$name])) {
|
|
84
|
+ $value = $this->_config['settings'][$name];
|
|
85
|
+ }
|
|
86
|
+ else {
|
|
87
|
+ $value = null;
|
|
88
|
+ }
|
|
89
|
+ }
|
|
90
|
+ return $value;
|
|
91
|
+ }
|
|
92
|
+
|
75
|
93
|
/**
|
76
|
94
|
* @return LuRoute
|
77
|
95
|
*/
|