|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of Jitamin. |
|
5
|
|
|
* |
|
6
|
|
|
* Copyright (C) Jitamin Team |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Jitamin\Providers; |
|
13
|
|
|
|
|
14
|
|
|
use Jitamin\Console\ConfigCacheCommand; |
|
15
|
|
|
use Jitamin\Console\CronjobCommand; |
|
16
|
|
|
use Jitamin\Console\PluginInstallCommand; |
|
17
|
|
|
use Jitamin\Console\PluginUninstallCommand; |
|
18
|
|
|
use Jitamin\Console\PluginUpgradeCommand; |
|
19
|
|
|
use Jitamin\Console\ProjectDailyColumnStatsExportCommand; |
|
20
|
|
|
use Jitamin\Console\ProjectDailyStatsCalculationCommand; |
|
21
|
|
|
use Jitamin\Console\ResetPasswordCommand; |
|
22
|
|
|
use Jitamin\Console\ResetTwoFactorCommand; |
|
23
|
|
|
use Jitamin\Console\RouteCacheCommand; |
|
24
|
|
|
use Jitamin\Console\SubtaskExportCommand; |
|
25
|
|
|
use Jitamin\Console\TaskExportCommand; |
|
26
|
|
|
use Jitamin\Console\TaskOverdueNotificationCommand; |
|
27
|
|
|
use Jitamin\Console\TaskTriggerCommand; |
|
28
|
|
|
use Jitamin\Console\TransitionExportCommand; |
|
29
|
|
|
use Jitamin\Console\WorkerCommand; |
|
30
|
|
|
use Pimple\Container; |
|
31
|
|
|
use Pimple\ServiceProviderInterface; |
|
32
|
|
|
use Symfony\Component\Console\Application; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Class of Console Service Provider. |
|
36
|
|
|
*/ |
|
37
|
|
|
class ConsoleServiceProvider implements ServiceProviderInterface |
|
38
|
|
|
{ |
|
39
|
|
|
/** |
|
40
|
|
|
* Registers services on the given container. |
|
41
|
|
|
* |
|
42
|
|
|
* @param Container $container |
|
43
|
|
|
* |
|
44
|
|
|
* @return Container |
|
45
|
|
|
*/ |
|
46
|
|
|
public function register(Container $container) |
|
47
|
|
|
{ |
|
48
|
|
|
$application = new Application('Jitamin', APP_VERSION); |
|
49
|
|
|
$application->add(new ConfigCacheCommand($container)); |
|
50
|
|
|
$application->add(new RouteCacheCommand($container)); |
|
51
|
|
|
$application->add(new TaskOverdueNotificationCommand($container)); |
|
52
|
|
|
$application->add(new SubtaskExportCommand($container)); |
|
53
|
|
|
$application->add(new TaskExportCommand($container)); |
|
54
|
|
|
$application->add(new ProjectDailyStatsCalculationCommand($container)); |
|
55
|
|
|
$application->add(new ProjectDailyColumnStatsExportCommand($container)); |
|
56
|
|
|
$application->add(new TransitionExportCommand($container)); |
|
57
|
|
|
$application->add(new TaskTriggerCommand($container)); |
|
58
|
|
|
$application->add(new CronjobCommand($container)); |
|
59
|
|
|
$application->add(new WorkerCommand($container)); |
|
60
|
|
|
$application->add(new ResetPasswordCommand($container)); |
|
61
|
|
|
$application->add(new ResetTwoFactorCommand($container)); |
|
62
|
|
|
$application->add(new PluginUpgradeCommand($container)); |
|
63
|
|
|
$application->add(new PluginInstallCommand($container)); |
|
64
|
|
|
$application->add(new PluginUninstallCommand($container)); |
|
65
|
|
|
|
|
66
|
|
|
$container['cli'] = $application; |
|
67
|
|
|
|
|
68
|
|
|
return $container; |
|
69
|
|
|
} |
|
70
|
|
|
} |
|
71
|
|
|
|