Refactored DependencyFactory for Profiler

This commit is contained in:
Philipp Holzer 2019-02-17 21:12:12 +01:00
parent cdcf1667d7
commit 5e5c39b0e1
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
12 changed files with 65 additions and 47 deletions

View file

@ -25,12 +25,13 @@ class DependencyFactory
$basedir = BasePath::create($directory, $_SERVER);
$configLoader = new Cache\ConfigCacheLoader($basedir);
$configCache = Factory\ConfigFactory::createCache($configLoader);
Factory\DBFactory::init($configCache, $_SERVER);
$profiler = Factory\ProfilerFactory::create($configCache);
Factory\DBFactory::init($configCache, $profiler, $_SERVER);
$config = Factory\ConfigFactory::createConfig($configCache);
// needed to call PConfig::init()
Factory\ConfigFactory::createPConfig($configCache);
Factory\LoggerFactory::create($channel, $config);
$logger = Factory\LoggerFactory::create($channel, $config);
return new App($config, $isBackend);
return new App($config, $logger, $profiler, $isBackend);
}
}