friendica/bin/console.php
Philipp Holzer eafcf3592d
Config FollowUp
- New Configuration (Config is now only holding the instance)
- New PConfiguration (PConfig is now only holding the instance)

- Config & PConfig-Adapter don't need "ConfigCache" anymore

- DB-Connection is now outside App->reload() for better dependency-chaining
2019-02-17 20:40:27 +01:00

23 lines
777 B
PHP
Executable file

#!/usr/bin/env php
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
use Friendica\Core\Config\Cache;
use Friendica\Factory;
use Friendica\Util\BasePath;
$basedir = BasePath::create(dirname(__DIR__), $_SERVER);
$configLoader = new Cache\ConfigCacheLoader($basedir);
$configCache = Factory\ConfigFactory::createCache($configLoader);
Factory\DBFactory::init($configCache, $_SERVER);
$config = Factory\ConfigFactory::createConfig($configCache);
$pconfig = Factory\ConfigFactory::createPConfig($configCache);
$logger = Factory\LoggerFactory::create('console', $config);
$profiler = Factory\ProfilerFactory::create($logger, $config);
$a = new Friendica\App($config, $logger, $profiler);
\Friendica\BaseObject::setApp($a);
(new Friendica\Core\Console($argv))->execute();