diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/appconfig.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/config/appconfig.php b/config/appconfig.php index ae8f268f5..52e82dc25 100644 --- a/config/appconfig.php +++ b/config/appconfig.php @@ -153,6 +153,15 @@ class AppConfig { } } + private function testDatabaseDependencies($databases, $databaseType) { + if(!in_array($databaseType, $databases)) { + return 'Database ' . $databaseType . ' not supported.' . + 'App is only compatible with ' . + implode(', ', $databases); + } else { + return ''; + } + } /** * Validates all dependencies that the app has @@ -163,11 +172,9 @@ class AppConfig { // test databases if(array_key_exists('databases', $this->config)) { - if(!in_array($this->databaseType, $this->config['databases'])) { - $msg .= 'Database ' . $this->databaseType . ' not supported.' . - 'App is only compatible with ' . - implode(', ', $this->config['databases']); - } + $msg .= $this->testDatabaseDependencies( + $this->config['databases'], $this->databaseType + ); } // test dependencies |