1 | <?php |
||
25 | class CreateTranslationResourcesCommand extends Command |
||
26 | { |
||
27 | /** |
||
28 | * @var LanguageRepository |
||
29 | */ |
||
30 | private $languageRepo; |
||
31 | |||
32 | /** |
||
33 | * @var TranslatableRepository |
||
34 | */ |
||
35 | private $translatableRepo; |
||
36 | |||
37 | /** |
||
38 | * @var Filesystem |
||
39 | */ |
||
40 | private $filesystem; |
||
41 | |||
42 | /** |
||
43 | * @var DataCollectorTranslator |
||
44 | */ |
||
45 | private $translator; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | private $resourceDir; |
||
51 | |||
52 | /** |
||
53 | * @param LanguageRepository $languageRepo Language Repository |
||
54 | * @param TranslatableRepository $translatableRepo Translatable Repository |
||
55 | * @param Filesystem $filesystem symfony/filesystem tooling |
||
56 | * @param DataCollectorTranslator $translator Resource translator |
||
57 | */ |
||
58 | public function __construct( |
||
72 | |||
73 | /** |
||
74 | * set up command |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | protected function configure() |
||
86 | |||
87 | /** |
||
88 | * run command |
||
89 | * |
||
90 | * @param InputInterface $input input interface |
||
91 | * @param OutputInterface $output output interface |
||
92 | * |
||
93 | * @return void |
||
94 | */ |
||
95 | protected function execute(InputInterface $input, OutputInterface $output) |
||
126 | |||
127 | /** |
||
128 | * Generate resource translations, return count of translations generated |
||
129 | * |
||
130 | * @param string $domain Translation domain name |
||
131 | * @param string $locale Iso language locale string |
||
132 | * |
||
133 | * @return integer |
||
134 | */ |
||
135 | private function generateResourceTranslations($domain, $locale) |
||
155 | } |
||
156 |