diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-27 14:07:47 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-27 14:07:47 +0200 |
commit | 619011d11299a601d52d576920a668a6e286d2e7 (patch) | |
tree | 99cab70e6acfdd0140a90b73678a9b631d532d92 /appinfo/application.php | |
parent | adad6ca280f2284a0ea4a1c41c8adea4ae1b141a (diff) |
fix config
Diffstat (limited to 'appinfo/application.php')
-rw-r--r-- | appinfo/application.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/appinfo/application.php b/appinfo/application.php index 6b7ba4379..22783ef87 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -50,6 +50,7 @@ class Application extends App { // parameters $this->registerParameter('exploreDir', __DIR__ . '/../explore'); + $this->registerParameter('configFile', 'config.ini'); // factories $this->registerFactory(ItemMapper::class, MapperFactory::class); @@ -97,7 +98,7 @@ class Application extends App { $c->query(ILogger::class), $c->query('LoggerParameters') ); - $config->read('config.ini', true); + $config->read($c->query('configFile'), true); return $config; }); @@ -182,7 +183,7 @@ class Application extends App { * @param string $file path relative to this file, __DIR__ will be prepended */ private function registerFileContents($key, $file) { - $this->registerService($key, function () { + $this->registerService($key, function () use ($file) { return file_get_contents(__DIR__ . '/' . $file); }); } |