daux.io/libs/Console/ClearCache.php

26 lines
701 B
PHP
Raw Permalink Normal View History

2018-06-07 20:40:38 +02:00
<?php namespace Todaymade\Daux\Console;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Cache;
class ClearCache extends SymfonyCommand
{
protected function configure()
{
$this
->setName('clear-cache')
->setDescription('Clears the cache');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
2019-12-07 16:32:38 +01:00
$output->writeln("Clearing cache at '" . Cache::getDirectory() . "'");
2018-06-07 20:40:38 +02:00
Cache::clear();
$output->writeln("<info>Cache cleared</info>");
2019-11-28 22:41:53 +01:00
return 0;
2018-06-07 20:40:38 +02:00
}
}