+++ /dev/null
-<?php
-
-// Copyright (C) 2010-2024, the Friendica project
-// SPDX-FileCopyrightText: 2010-2024 the Friendica project
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-declare(strict_types=1);
-
-namespace Friendica\Console;
-
-use Asika\SimpleConsole\Console;
-use Friendica\Core\Console as CoreConsole;
-use Friendica\Core\Logger\Capability\LogChannel;
-
-/**
- * Abstract Console class for common settings
- */
-abstract class AbstractConsole extends Console
-{
- /**
- * Overwrite this const in case you want to switch the LogChannel for this console command
- *
- * @var string
- */
- public const LOG_CHANNEL = LogChannel::CONSOLE;
-
- /**
- * Checks, if the Console command was executed outside `bin/console.php` and prints the correct execution
- *
- * @param string $command the current command
- */
- protected function checkDeprecated(string $command): void
- {
- if (substr($this->executable, -strlen(CoreConsole::getDefaultExecutable())) !== CoreConsole::getDefaultExecutable()) {
- $this->out(sprintf("'%s' is deprecated and will removed. Please use 'bin/console.php %s' instead", $this->executable, $command));
- }
- }
-}
use Friendica\App\Mode;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
-use Friendica\Core\Logger\Capability\LogChannel;
use Friendica\Core\System;
use Friendica\Core\Update;
use Friendica\Core\Worker;
*/
final class Daemon extends Console
{
- public const LOG_CHANNEL = LogChannel::DAEMON;
-
private Mode $mode;
private IManageConfigValues $config;
private IManageKeyValuePairs $keyValue;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Hook;
use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
-use Friendica\Core\Logger\Capability\LogChannel;
use Friendica\Protocol\ATProtocol\Jetstream;
use Friendica\System\Daemon as SysDaemon;
use RuntimeException;
*/
final class JetstreamDaemon extends Console
{
- public const LOG_CHANNEL = LogChannel::DAEMON;
-
private Mode $mode;
private IManageConfigValues $config;
private IManageKeyValuePairs $keyValue;
use Asika\SimpleConsole\Console;
use Friendica\App\Mode;
-use Friendica\Core\Logger\Capability\LogChannel;
use Friendica\Core\Update;
use Friendica\Core\Worker as CoreWorker;
use Friendica\Core\Worker\Repository\Process as ProcessRepository;
*/
final class Worker extends Console
{
- public const LOG_CHANNEL = LogChannel::WORKER;
-
private Mode $mode;
private BasePath $basePath;
private ProcessRepository $processRepo;