1 | <?php |
||
16 | class ZohoSyncDatabaseCommand extends Command |
||
17 | { |
||
18 | /** |
||
19 | * The list of Zoho DAOs to copy. |
||
20 | * |
||
21 | * @var AbstractZohoDao[] |
||
22 | */ |
||
23 | private $zohoDaos; |
||
24 | |||
25 | /** |
||
26 | * @var ZohoDatabaseModelSync |
||
27 | */ |
||
28 | private $zohoDatabaseModelSync; |
||
29 | |||
30 | /** |
||
31 | * @var ZohoDatabaseCopier |
||
32 | */ |
||
33 | private $zohoDatabaseCopier; |
||
34 | |||
35 | /** |
||
36 | * @var ZohoDatabasePusher |
||
37 | */ |
||
38 | private $zohoDatabaseSync; |
||
39 | |||
40 | /** |
||
41 | * @var Lock |
||
42 | */ |
||
43 | private $lock; |
||
44 | |||
45 | /** |
||
46 | * The Zoho Dao and Beans generator |
||
47 | * @var EntitiesGeneratorService |
||
48 | */ |
||
49 | private $zohoEntitiesGenerator; |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | * @var ZohoClient |
||
54 | */ |
||
55 | private $zohoClient; |
||
56 | |||
57 | private $pathZohoDaos; |
||
58 | |||
59 | private $namespaceZohoDaos; |
||
60 | |||
61 | |||
62 | /** |
||
63 | * @param ZohoDatabaseModelSync $zohoDatabaseModelSync |
||
64 | * @param ZohoDatabaseCopier $zohoDatabaseCopier |
||
65 | * @param ZohoDatabasePusher $zohoDatabaseSync |
||
66 | * @param EntitiesGeneratorService $zohoEntitiesGenerator The Zoho Dao and Beans generator |
||
67 | * @param ZohoClient $zohoClient |
||
68 | * @param string $pathZohoDaos Tht path where we need to generate the Daos. |
||
69 | * @param string $namespaceZohoDaos Daos namespace |
||
70 | * @param Lock $lock A lock that can be used to avoid running the same command (copy) twice at the same time |
||
71 | */ |
||
72 | public function __construct(ZohoDatabaseModelSync $zohoDatabaseModelSync, ZohoDatabaseCopier $zohoDatabaseCopier, ZohoDatabasePusher $zohoDatabaseSync, |
||
86 | |||
87 | protected function configure() |
||
97 | |||
98 | protected function execute(InputInterface $input, OutputInterface $output) |
||
127 | |||
128 | /** |
||
129 | * Sychronizes the model of the database with Zoho records. |
||
130 | * |
||
131 | * @param OutputInterface $output |
||
132 | */ |
||
133 | private function syncModel(InputInterface $input, OutputInterface $output) |
||
146 | |||
147 | |||
148 | /** |
||
149 | * Regerate Zoho Daos |
||
150 | * @param InputInterface $input |
||
151 | * @param OutputInterface $output |
||
152 | */ |
||
153 | private function regenerateZohoDao(InputInterface $input, OutputInterface $output) |
||
164 | |||
165 | |||
166 | /** |
||
167 | * Run the fetch Db command. |
||
168 | * |
||
169 | * @param InputInterface $input |
||
170 | * @param OutputInterface $output |
||
171 | */ |
||
172 | private function fetchDb(InputInterface $input, OutputInterface $output) |
||
190 | |||
191 | /** |
||
192 | * Run the push Db command. |
||
193 | * |
||
194 | * @param OutputInterface $output |
||
195 | */ |
||
196 | private function pushDb(OutputInterface $output) |
||
206 | } |
||
207 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.