1 | <?php |
||
20 | abstract class ImportCommandAbstract extends Command |
||
21 | { |
||
22 | /** |
||
23 | * @var Finder |
||
24 | */ |
||
25 | protected $finder; |
||
26 | |||
27 | /** |
||
28 | * @param Finder $finder finder instance |
||
29 | */ |
||
30 | 5 | public function __construct( |
|
31 | Finder $finder |
||
32 | ) { |
||
33 | 5 | $this->finder = $finder; |
|
34 | 5 | parent::__construct(); |
|
35 | 5 | } |
|
36 | |||
37 | /** |
||
38 | * Executes the current command. |
||
39 | * |
||
40 | * @param InputInterface $input User input on console |
||
41 | * @param OutputInterface $output Output of the command |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | 5 | protected function execute(InputInterface $input, OutputInterface $output) |
|
64 | |||
65 | /** |
||
66 | * the actual command can do his import here.. |
||
67 | * |
||
68 | * @param Finder $finder finder |
||
69 | * @param InputInterface $input input |
||
70 | * @param OutputInterface $output output |
||
71 | * |
||
72 | * @return mixed |
||
73 | */ |
||
74 | abstract protected function doImport(Finder $finder, InputInterface $input, OutputInterface $output); |
||
75 | } |
||
76 |