protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectMagento($output, true);
if (!$this->initMagento()) {
return;
}
$codeArgument = BinaryString::trimExplodeEmpty(',', $input->getArgument('code'));
$this->saveCacheStatus($codeArgument, false);
if (empty($codeArgument)) {
$this->_getCacheModel()->flush();
} else {
foreach ($codeArgument as $type) {
$this->_getCacheModel()->cleanType($type);
}
}
if (count($codeArgument) > 0) {
foreach ($codeArgument as $code) {
$output->writeln('<info>Cache <comment>' . $code . '</comment> disabled</info>');
}
} else {
$output->writeln('<info>Caches disabled</info>');
}
}