1 | <?php |
||
22 | class GenerateResourceCommand extends GenerateDoctrineEntityCommand |
||
23 | { |
||
24 | /** |
||
25 | * @var ResourceGenerator |
||
26 | */ |
||
27 | private $resourceGenerator; |
||
28 | /** |
||
29 | * @var LoaderInterface |
||
30 | */ |
||
31 | private $definitionLoader; |
||
32 | /** |
||
33 | * @var InputInterface |
||
34 | */ |
||
35 | private $input; |
||
36 | |||
37 | /** |
||
38 | * @param ResourceGenerator $resourceGenerator generator to use for resource generation |
||
39 | * @param LoaderInterface $definitionLoader JSON definition loaded |
||
40 | */ |
||
41 | 4 | public function __construct(ResourceGenerator $resourceGenerator, LoaderInterface $definitionLoader) |
|
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | 4 | protected function configure() |
|
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | * |
||
77 | * @param InputInterface $input input |
||
78 | * @param OutputInterface $output output |
||
79 | * |
||
80 | * @return void |
||
81 | */ |
||
82 | protected function execute(InputInterface $input, OutputInterface $output) |
||
83 | { |
||
84 | // put input here for later use.. |
||
85 | $this->input = $input; |
||
86 | |||
87 | parent::execute( |
||
88 | $input, |
||
89 | $output |
||
90 | ); |
||
91 | } |
||
92 | |||
93 | /** |
||
94 | * {@inheritDoc} |
||
95 | * |
||
96 | * @return ResourceGenerator |
||
97 | */ |
||
98 | protected function createGenerator() |
||
114 | } |
||
115 |