X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFactory%2FDependencyFactory.php;h=aacd1550605c365b46be6a82a8bf2a0ed64d75e3;hb=295d90d496a56217383481fa7a0153e0ac48e38a;hp=9d84e324ab5370a32bb7b7692d109b9432c72ae1;hpb=579d42a2155d9581147a3bc1e672ac242509133d;p=friendica.git diff --git a/src/Factory/DependencyFactory.php b/src/Factory/DependencyFactory.php index 9d84e324ab..aacd155060 100644 --- a/src/Factory/DependencyFactory.php +++ b/src/Factory/DependencyFactory.php @@ -3,9 +3,11 @@ namespace Friendica\Factory; use Friendica\App; -use Friendica\Core\Config\Cache; +use Friendica\Database\DBA; use Friendica\Factory; use Friendica\Util\BasePath; +use Friendica\Util\BaseURL; +use Friendica\Util\Config; class DependencyFactory { @@ -23,16 +25,20 @@ class DependencyFactory public static function setUp($channel, $directory, $isBackend = true) { $basePath = BasePath::create($directory, $_SERVER); - $configLoader = new Cache\ConfigCacheLoader($basePath); + $mode = new App\Mode($basePath); + $router = new App\Router(); + $configLoader = new Config\ConfigFileLoader($basePath, $mode); $configCache = Factory\ConfigFactory::createCache($configLoader); $profiler = Factory\ProfilerFactory::create($configCache); - Factory\DBFactory::init($basePath, $configCache, $profiler, $_SERVER); + Factory\DBFactory::init($configCache, $profiler, $_SERVER); $config = Factory\ConfigFactory::createConfig($configCache); // needed to call PConfig::init() Factory\ConfigFactory::createPConfig($configCache); - $logger = Factory\LoggerFactory::create($channel, $config); - Factory\LoggerFactory::createDev($channel, $config); + $logger = Factory\LoggerFactory::create($channel, $config, $profiler); + DBA::setLogger($logger); + Factory\LoggerFactory::createDev($channel, $config, $profiler); + $baseURL = new BaseURL($config, $_SERVER); - return new App($basePath, $config, $logger, $profiler, $isBackend); + return new App($config, $mode, $router, $baseURL, $logger, $profiler, $isBackend); } }