Adding DependencyFactory
This commit is contained in:
parent
0a318925a4
commit
cdcf1667d7
6 changed files with 48 additions and 74 deletions
|
@ -3,21 +3,9 @@
|
|||
|
||||
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);
|
||||
// needed to call PConfig::init()
|
||||
Factory\ConfigFactory::createPConfig($configCache);
|
||||
$logger = Factory\LoggerFactory::create('console', $config);
|
||||
$profiler = Factory\ProfilerFactory::create($logger, $config);
|
||||
|
||||
$a = new Friendica\App($config, $logger, $profiler);
|
||||
$a = Factory\DependencyFactory::setUp('console', dirname(__DIR__));
|
||||
\Friendica\BaseObject::setApp($a);
|
||||
|
||||
(new Friendica\Core\Console($argv))->execute();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue