1 | <?php |
||
25 | abstract class ObjectOutputCommand extends Command |
||
26 | { |
||
27 | /** |
||
28 | * @var JsonConverter |
||
29 | */ |
||
30 | protected $jsonConverter; |
||
31 | |||
32 | /** |
||
33 | * AbstractGeneratorCommand constructor. |
||
34 | * |
||
35 | * @param JsonConverter $jsonConverter |
||
36 | * @param string|null $name |
||
37 | */ |
||
38 | public function __construct(JsonConverter $jsonConverter, string $name = null) |
||
43 | |||
44 | /** |
||
45 | * Configures the current command. |
||
46 | */ |
||
47 | protected function configure() |
||
53 | |||
54 | /** |
||
55 | * @param InputInterface $input |
||
56 | * @param OutputInterface $output |
||
57 | * @param \JsonSerializable $json |
||
58 | */ |
||
59 | protected function prepareJsonOutput(InputInterface $input, OutputInterface $output, \JsonSerializable $json) |
||
64 | |||
65 | /** |
||
66 | * @param InputInterface $input |
||
67 | * @param OutputInterface $output |
||
68 | * @param string $data |
||
69 | */ |
||
70 | protected function prepareOutput(InputInterface $input, OutputInterface $output, string $data) |
||
79 | } |
||
80 |