di = $di;
}
public function getDi(): ?\Pimple\Container
{
return $this->di;
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$service = $this->di['mod_service']('system');
try {
$service->clearCache();
} catch (\Exception $e) {
$output->writeln("An error occurred: {$e->getMessage()}");
return Command::FAILURE;
}
$output->writeln('Successfully cleared the cache.');
return Command::SUCCESS;
}
}