Rename CLI classes
This commit is contained in:
@@ -25,7 +25,7 @@ use Symfony\Component\Console\Command\Command;
|
|||||||
* @property \Kanboard\Model\UserNotificationFilter $userNotificationFilter
|
* @property \Kanboard\Model\UserNotificationFilter $userNotificationFilter
|
||||||
* @property \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
|
* @property \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
|
||||||
*/
|
*/
|
||||||
abstract class Base extends Command
|
abstract class BaseCommand extends Command
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Container instance
|
* Container instance
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
|||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Output\NullOutput;
|
use Symfony\Component\Console\Output\NullOutput;
|
||||||
|
|
||||||
class Cronjob extends Base
|
class CronjobCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
private $commands = array(
|
private $commands = array(
|
||||||
'projects:daily-stats',
|
'projects:daily-stats',
|
||||||
@@ -7,7 +7,7 @@ use RecursiveDirectoryIterator;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class LocaleComparator extends Base
|
class LocaleComparatorCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
const REF_LOCALE = 'fr_FR';
|
const REF_LOCALE = 'fr_FR';
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ use DirectoryIterator;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class LocaleSync extends Base
|
class LocaleSyncCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
const REF_LOCALE = 'fr_FR';
|
const REF_LOCALE = 'fr_FR';
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class ProjectDailyColumnStatsExport extends Base
|
class ProjectDailyColumnStatsExportCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@ use Kanboard\Model\Project;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class ProjectDailyStatsCalculation extends Base
|
class ProjectDailyStatsCalculationCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class SubtaskExport extends Base
|
class SubtaskExportCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class TaskExport extends Base
|
class TaskExportCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
|||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class TaskOverdueNotification extends Base
|
class TaskOverdueNotificationCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
use Kanboard\Model\Task;
|
use Kanboard\Model\Task;
|
||||||
use Kanboard\Event\TaskListEvent;
|
use Kanboard\Event\TaskListEvent;
|
||||||
|
|
||||||
class TaskTrigger extends Base
|
class TaskTriggerCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class TransitionExport extends Base
|
class TransitionExportCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
40
kanboard
40
kanboard
@@ -5,28 +5,28 @@ require __DIR__.'/app/common.php';
|
|||||||
|
|
||||||
use Symfony\Component\Console\Application;
|
use Symfony\Component\Console\Application;
|
||||||
use Symfony\Component\EventDispatcher\Event;
|
use Symfony\Component\EventDispatcher\Event;
|
||||||
use Kanboard\Console\TaskOverdueNotification;
|
use Kanboard\Console\TaskOverdueNotificationCommand;
|
||||||
use Kanboard\Console\SubtaskExport;
|
use Kanboard\Console\SubtaskExportCommand;
|
||||||
use Kanboard\Console\TaskExport;
|
use Kanboard\Console\TaskExportCommand;
|
||||||
use Kanboard\Console\ProjectDailyStatsCalculation;
|
use Kanboard\Console\ProjectDailyStatsCalculationCommand;
|
||||||
use Kanboard\Console\ProjectDailyColumnStatsExport;
|
use Kanboard\Console\ProjectDailyColumnStatsExportCommand;
|
||||||
use Kanboard\Console\TransitionExport;
|
use Kanboard\Console\TransitionExportCommand;
|
||||||
use Kanboard\Console\LocaleSync;
|
use Kanboard\Console\LocaleSyncCommand;
|
||||||
use Kanboard\Console\LocaleComparator;
|
use Kanboard\Console\LocaleComparatorCommand;
|
||||||
use Kanboard\Console\TaskTrigger;
|
use Kanboard\Console\TaskTriggerCommand;
|
||||||
use Kanboard\Console\Cronjob;
|
use Kanboard\Console\CronjobCommand;
|
||||||
|
|
||||||
$container['dispatcher']->dispatch('app.bootstrap', new Event);
|
$container['dispatcher']->dispatch('app.bootstrap', new Event);
|
||||||
|
|
||||||
$application = new Application('Kanboard', APP_VERSION);
|
$application = new Application('Kanboard', APP_VERSION);
|
||||||
$application->add(new TaskOverdueNotification($container));
|
$application->add(new TaskOverdueNotificationCommand($container));
|
||||||
$application->add(new SubtaskExport($container));
|
$application->add(new SubtaskExportCommand($container));
|
||||||
$application->add(new TaskExport($container));
|
$application->add(new TaskExportCommand($container));
|
||||||
$application->add(new ProjectDailyStatsCalculation($container));
|
$application->add(new ProjectDailyStatsCalculationCommand($container));
|
||||||
$application->add(new ProjectDailyColumnStatsExport($container));
|
$application->add(new ProjectDailyColumnStatsExportCommand($container));
|
||||||
$application->add(new TransitionExport($container));
|
$application->add(new TransitionExportCommand($container));
|
||||||
$application->add(new LocaleSync($container));
|
$application->add(new LocaleSyncCommand($container));
|
||||||
$application->add(new LocaleComparator($container));
|
$application->add(new LocaleComparatorCommand($container));
|
||||||
$application->add(new TaskTrigger($container));
|
$application->add(new TaskTriggerCommand($container));
|
||||||
$application->add(new Cronjob($container));
|
$application->add(new CronjobCommand($container));
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|||||||
Reference in New Issue
Block a user