setName('cache:clear') ->setDescription('Clear the cache'); parent::configure(); } /** * {@inheritDoc} * @see \Magdev\Dossier\Command\Base\BaseCommand::initialize() */ protected function initialize(InputInterface $input, OutputInterface $output) { $input->setOption('no-header', true); parent::initialize($input, $output); } /** * {@inheritDoc} * @see \Symfony\Component\Console\Command\Command::execute() */ protected function execute(InputInterface $input, OutputInterface $output) { if (DOSSIER_CACHE && DOSSIER_CACHE != '/' && is_dir(DOSSIER_CACHE)) { system('rm -rf '.DOSSIER_CACHE.' 2>&1 >> /dev/null'); } } }