1 | <?php |
||
22 | abstract class AbstractObjectOutputCommand extends Command |
||
23 | { |
||
24 | /** |
||
25 | * @var JsonConverterInterface |
||
26 | */ |
||
27 | protected $jsonConverter; |
||
28 | |||
29 | /** |
||
30 | * AbstractGeneratorCommand constructor. |
||
31 | * |
||
32 | * @param JsonConverterInterface $jsonConverter |
||
33 | * @param string|null $name |
||
34 | */ |
||
35 | public function __construct(JsonConverterInterface $jsonConverter, string $name = null) |
||
40 | |||
41 | /** |
||
42 | * Configures the current command. |
||
43 | */ |
||
44 | protected function configure() |
||
50 | |||
51 | /** |
||
52 | * @param InputInterface $input |
||
53 | * @param OutputInterface $output |
||
54 | * @param \JsonSerializable $json |
||
55 | */ |
||
56 | protected function prepareJsonOutput(InputInterface $input, OutputInterface $output, \JsonSerializable $json) |
||
61 | |||
62 | /** |
||
63 | * @param InputInterface $input |
||
64 | * @param OutputInterface $output |
||
65 | * @param string $data |
||
66 | */ |
||
67 | protected function prepareOutput(InputInterface $input, OutputInterface $output, string $data) |
||
76 | } |
||
77 |