friendica-github/bin/console.php

24 lines
800 B
PHP
Raw Normal View History

2018-03-18 17:26:51 +00:00
#!/usr/bin/env php
2018-03-18 09:12:39 +00:00
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
2018-03-18 09:12:39 +00:00
use Friendica\Core\Config\Cache;
use Friendica\Factory;
use Friendica\Util\BasePath;
2018-12-30 20:42:56 +00:00
2019-02-05 21:27:57 +00:00
$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);
2019-02-16 22:18:24 +00:00
$profiler = Factory\ProfilerFactory::create($logger, $config);
2018-12-30 20:42:56 +00:00
2019-02-16 22:11:30 +00:00
$a = new Friendica\App($config, $logger, $profiler);
2018-03-18 09:12:39 +00:00
\Friendica\BaseObject::setApp($a);
2018-03-31 02:56:04 +00:00
(new Friendica\Core\Console($argv))->execute();