protected function execute(InputInterface $input, OutputInterface $output)
{
$this->startCommand($output);
$countries = $this->getCountriesFromInput($input);
foreach ($countries as $countryCode) {
$countryCode = strtoupper($countryCode);
if ($input->getOption('drop-if-exists')) {
$this->deleteCountry($input, $output, $countryCode);
}
try {
$this->locationLoader->loadCountry($countryCode);
$this->printMessage($output, 'Geo', 'Country ' . $countryCode . ' loaded from repository');
} catch (Exception $exception) {
$this->printMessageFail($output, 'Geo', 'Country ' . $countryCode . ' cannot be loaded from repository');
}
}
$this->finishCommand($output);
}