1 | <?php |
||
17 | abstract class AbstractTaskCommand extends ContainerAwareCommand |
||
18 | { |
||
19 | /** @var TaskEventManager */ |
||
20 | protected $taskEventManager; |
||
21 | |||
22 | /** @var TaskManager */ |
||
23 | protected $taskManager; |
||
24 | |||
25 | /** @var ValidatorInterface */ |
||
26 | protected $validator; |
||
27 | |||
28 | public function initialize(InputInterface $input, OutputInterface $output) |
||
36 | |||
37 | /** |
||
38 | * @param TaskEventInterface $taskEvent |
||
39 | * @param InputInterface $input |
||
40 | * @param OutputInterface $output |
||
41 | * @return TaskEventInterface |
||
42 | */ |
||
43 | protected function process(TaskEventInterface $taskEvent, InputInterface $input, OutputInterface $output) |
||
53 | |||
54 | /** |
||
55 | * Overwrite this function if you want to do something before we process the TaskEvent |
||
56 | * @param TaskEventInterface $taskEvent |
||
57 | * @param InputInterface $input |
||
58 | * @param OutputInterface $output |
||
59 | */ |
||
60 | protected function preProcess(TaskEventInterface $taskEvent, InputInterface $input, OutputInterface $output) |
||
63 | |||
64 | /** |
||
65 | * Overwrite this function if you want to do something after we process the TaskEvent |
||
66 | * @param TaskEventInterface $taskEvent |
||
67 | * @param InputInterface $input |
||
68 | * @param OutputInterface $output |
||
69 | */ |
||
70 | protected function postProcess(TaskEventInterface $taskEvent, InputInterface $input, OutputInterface $output) |
||
73 | |||
74 | /** |
||
75 | * @param TaskTypeInterface $task |
||
76 | * @return array |
||
77 | */ |
||
78 | protected function validateTask(TaskTypeInterface $task) |
||
88 | } |
||
89 |