mirror of
https://github.com/friendica/friendica
synced 2025-02-01 02:59:47 +00:00
Move Console call into App class
This commit is contained in:
parent
744bf9f971
commit
610267a3ea
5 changed files with 21 additions and 4 deletions
|
@ -20,4 +20,7 @@ require dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
$dice = (new Dice())->addRules(require(dirname(__DIR__) . '/static/dependencies.config.php'));
|
$dice = (new Dice())->addRules(require(dirname(__DIR__) . '/static/dependencies.config.php'));
|
||||||
|
|
||||||
$container = \Friendica\Core\Container::fromDice($dice);
|
$container = \Friendica\Core\Container::fromDice($dice);
|
||||||
\Friendica\Core\Console::create($container, $_SERVER['argv'] ?? [])->execute();
|
|
||||||
|
$app = \Friendica\App::fromContainer($container);
|
||||||
|
|
||||||
|
$app->processConsole($_SERVER['argv'] ?? []);
|
||||||
|
|
|
@ -32,4 +32,7 @@ $argv = $_SERVER['argv'] ?? [];
|
||||||
array_splice($argv, 1, 0, "daemon");
|
array_splice($argv, 1, 0, "daemon");
|
||||||
|
|
||||||
$container = \Friendica\Core\Container::fromDice($dice);
|
$container = \Friendica\Core\Container::fromDice($dice);
|
||||||
\Friendica\Core\Console::create($container, $argv)->execute();
|
|
||||||
|
$app = \Friendica\App::fromContainer($container);
|
||||||
|
|
||||||
|
$app->processConsole($argv);
|
||||||
|
|
|
@ -27,4 +27,7 @@ $argv = $_SERVER['argv'] ?? [];
|
||||||
array_splice($argv, 1, 0, "jetstream");
|
array_splice($argv, 1, 0, "jetstream");
|
||||||
|
|
||||||
$container = \Friendica\Core\Container::fromDice($dice);
|
$container = \Friendica\Core\Container::fromDice($dice);
|
||||||
\Friendica\Core\Console::create($container, $argv)->execute();
|
|
||||||
|
$app = \Friendica\App::fromContainer($container);
|
||||||
|
|
||||||
|
$app->processConsole($argv);
|
||||||
|
|
|
@ -29,4 +29,7 @@ $argv = $_SERVER['argv'] ?? [];
|
||||||
array_splice($argv, 1, 0, "worker");
|
array_splice($argv, 1, 0, "worker");
|
||||||
|
|
||||||
$container = \Friendica\Core\Container::fromDice($dice);
|
$container = \Friendica\Core\Container::fromDice($dice);
|
||||||
\Friendica\Core\Console::create($container, $argv)->execute();
|
|
||||||
|
$app = \Friendica\App::fromContainer($container);
|
||||||
|
|
||||||
|
$app->processConsole($argv);
|
||||||
|
|
|
@ -168,6 +168,11 @@ class App
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function processConsole(array $argv): void
|
||||||
|
{
|
||||||
|
(\Friendica\Core\Console::create($this->container, $argv))->execute();
|
||||||
|
}
|
||||||
|
|
||||||
public function processEjabberd(): void
|
public function processEjabberd(): void
|
||||||
{
|
{
|
||||||
$this->container->setup(LogChannel::AUTH_JABBERED, false);
|
$this->container->setup(LogChannel::AUTH_JABBERED, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue