1 | <?php |
||
18 | class ZohoSyncDatabaseCommand extends Command |
||
19 | { |
||
20 | /** |
||
21 | * The list of Zoho DAOs to copy. |
||
22 | * |
||
23 | * @var AbstractZohoDao[] |
||
24 | */ |
||
25 | private $zohoDaos; |
||
26 | |||
27 | /** |
||
28 | * @var ZohoDatabaseModelSync |
||
29 | */ |
||
30 | private $zohoDatabaseModelSync; |
||
31 | |||
32 | /** |
||
33 | * @var ZohoDatabaseCopier |
||
34 | */ |
||
35 | private $zohoDatabaseCopier; |
||
36 | |||
37 | /** |
||
38 | * @var ZohoDatabasePusher |
||
39 | */ |
||
40 | private $zohoDatabaseSync; |
||
41 | |||
42 | /** |
||
43 | * |
||
44 | * @var MultiLogger |
||
45 | */ |
||
46 | private $logger; |
||
47 | |||
48 | /** |
||
49 | * @var Lock |
||
50 | */ |
||
51 | private $lock; |
||
52 | |||
53 | /** |
||
54 | * The Zoho Dao and Beans generator |
||
55 | * @var EntitiesGeneratorService |
||
56 | */ |
||
57 | private $zohoEntitiesGenerator; |
||
58 | |||
59 | /** |
||
60 | * |
||
61 | * @var ZohoClient |
||
62 | */ |
||
63 | private $zohoClient; |
||
64 | |||
65 | private $pathZohoDaos; |
||
66 | |||
67 | private $namespaceZohoDaos; |
||
68 | |||
69 | |||
70 | /** |
||
71 | * @param ZohoDatabaseModelSync $zohoDatabaseModelSync |
||
72 | * @param ZohoDatabaseCopier $zohoDatabaseCopier |
||
73 | * @param ZohoDatabasePusher $zohoDatabaseSync |
||
74 | * @param EntitiesGeneratorService $zohoEntitiesGenerator The Zoho Dao and Beans generator |
||
75 | * @param ZohoClient $zohoClient |
||
76 | * @param string $pathZohoDaos Tht path where we need to generate the Daos. |
||
77 | * @param string $namespaceZohoDaos Daos namespace |
||
78 | * @param MultiLogger $logger |
||
79 | * @param Lock $lock A lock that can be used to avoid running the same command (copy) twice at the same time |
||
80 | */ |
||
81 | public function __construct(ZohoDatabaseModelSync $zohoDatabaseModelSync, ZohoDatabaseCopier $zohoDatabaseCopier, ZohoDatabasePusher $zohoDatabaseSync, |
||
96 | |||
97 | protected function configure() |
||
107 | |||
108 | protected function execute(InputInterface $input, OutputInterface $output) |
||
137 | |||
138 | /** |
||
139 | * Sychronizes the model of the database with Zoho records. |
||
140 | * |
||
141 | * @param OutputInterface $output |
||
142 | */ |
||
143 | private function syncModel(InputInterface $input, OutputInterface $output) |
||
154 | |||
155 | /** |
||
156 | * @param AbstractZohoDao $zohoDao |
||
157 | * |
||
158 | * @return array |
||
159 | */ |
||
160 | private function getListFieldName(AbstractZohoDao $zohoDao) |
||
171 | |||
172 | /** |
||
173 | * Regerate Zoho Daos |
||
174 | * @param InputInterface $input |
||
175 | * @param OutputInterface $output |
||
176 | */ |
||
177 | private function regenerateZohoDao(OutputInterface $output) |
||
192 | |||
193 | |||
194 | /** |
||
195 | * Run the fetch Db command. |
||
196 | * |
||
197 | * @param InputInterface $input |
||
198 | * @param OutputInterface $output |
||
199 | */ |
||
200 | private function fetchDb(InputInterface $input, OutputInterface $output) |
||
217 | |||
218 | /** |
||
219 | * Run the push Db command. |
||
220 | * |
||
221 | * @param OutputInterface $output |
||
222 | */ |
||
223 | private function pushDb(OutputInterface $output) |
||
232 | } |
||
233 |
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.