1 | <?php |
||
16 | abstract class TaskCommand extends ContainerAwareCommand |
||
17 | { |
||
18 | /** @var TaskEventManager */ |
||
19 | private $taskEventManager; |
||
20 | |||
21 | /** @var TaskManager */ |
||
22 | private $taskManager; |
||
23 | |||
24 | /** @var ValidatorInterface */ |
||
25 | private $validator; |
||
26 | |||
27 | public function initialize(InputInterface $input, OutputInterface $output) |
||
35 | |||
36 | /** |
||
37 | * @param InputInterface $input |
||
38 | * @param OutputInterface $output |
||
39 | * @return int|null |
||
40 | */ |
||
41 | public function execute(InputInterface $input, OutputInterface $output) |
||
68 | |||
69 | /** |
||
70 | * @param TaskBuilder $taskBuilder |
||
71 | * @param InputInterface $input |
||
72 | * @return TaskBuilder |
||
73 | */ |
||
74 | abstract protected function buildTaskBuilder(TaskBuilder $taskBuilder, InputInterface $input); |
||
75 | |||
76 | /** |
||
77 | * Overwrite this function if you want to do something before we process the TaskEvent |
||
78 | * @param TaskEvent $taskEvent |
||
79 | * @param InputInterface $input |
||
80 | * @param OutputInterface $output |
||
81 | */ |
||
82 | protected function prepareTaskEvent(TaskEvent $taskEvent, InputInterface $input, OutputInterface $output) |
||
85 | |||
86 | /** |
||
87 | * Overwrite this function if you want to do something before we process the TaskEvent |
||
88 | * @param TaskEvent $taskEvent |
||
89 | * @param InputInterface $input |
||
90 | * @param OutputInterface $output |
||
91 | */ |
||
92 | protected function preProcess(TaskEvent $taskEvent, InputInterface $input, OutputInterface $output) |
||
95 | |||
96 | /** |
||
97 | * Overwrite this function if you want to do something before we process the TaskEvent |
||
98 | * @param TaskEvent $taskEvent |
||
99 | * @param InputInterface $input |
||
100 | * @param OutputInterface $output |
||
101 | */ |
||
102 | protected function postProcess(TaskEvent $taskEvent, InputInterface $input, OutputInterface $output) |
||
105 | |||
106 | /** |
||
107 | * @param TaskTypeInterface $task |
||
108 | * @return array |
||
109 | */ |
||
110 | protected function validateTask(TaskTypeInterface $task) |
||
120 | } |
||
121 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.