protected function execute(InputInterface $input, OutputInterface $output) { $download = new DownloadTranslations(new ConsoleLogger($output), new Config()); $download->setForceDownloadTrlFiles(true); try { $download->downloadTrlFiles(); } catch (LingohubException $e) { echo "LingohubException: " . $e->getMessage() . "\n"; return 1; } }
private function _downloadTranslations(Event $event) { if (!class_exists(__NAMESPACE__ . '\\DownloadTranslations')) { // uninstalling this package return; } $download = new DownloadTranslations(new ComposerOutput($this->_io), $this->_config); try { $download->downloadTrlFiles(); } catch (LingohubException $e) { echo "LingohubException: " . $e->getMessage() . "\n"; } }