2018-03-18 18:26:51 +01:00
|
|
|
#!/usr/bin/env php
|
2018-03-18 10:12:39 +01:00
|
|
|
<?php
|
|
|
|
|
2018-12-24 15:56:48 +01:00
|
|
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
2018-03-18 10:12:39 +01:00
|
|
|
|
2019-02-10 19:52:21 +01:00
|
|
|
use Friendica\Core\Config\Cache;
|
2019-02-03 22:46:50 +01:00
|
|
|
use Friendica\Factory;
|
|
|
|
use Friendica\Util\BasePath;
|
2018-12-30 21:42:56 +01:00
|
|
|
|
2019-02-05 22:27:57 +01:00
|
|
|
$basedir = BasePath::create(dirname(__DIR__), $_SERVER);
|
2019-02-10 19:52:21 +01:00
|
|
|
$configLoader = new Cache\ConfigCacheLoader($basedir);
|
|
|
|
$configCache = Factory\ConfigFactory::createCache($configLoader);
|
|
|
|
Factory\DBFactory::init($configCache, $_SERVER);
|
|
|
|
$config = Factory\ConfigFactory::createConfig($configCache);
|
2019-02-11 21:13:53 +01:00
|
|
|
// needed to call PConfig::init()
|
|
|
|
Factory\ConfigFactory::createPConfig($configCache);
|
2019-02-03 22:46:50 +01:00
|
|
|
$logger = Factory\LoggerFactory::create('console', $config);
|
2019-02-16 23:18:24 +01:00
|
|
|
$profiler = Factory\ProfilerFactory::create($logger, $config);
|
2018-12-30 21:42:56 +01:00
|
|
|
|
2019-02-16 23:11:30 +01:00
|
|
|
$a = new Friendica\App($config, $logger, $profiler);
|
2018-03-18 10:12:39 +01:00
|
|
|
\Friendica\BaseObject::setApp($a);
|
|
|
|
|
2018-03-31 04:56:04 +02:00
|
|
|
(new Friendica\Core\Console($argv))->execute();
|