daux.io/libs/Console/ClearCache.php

26 lines
700 B
PHP
Raw 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)
{
$output->writeln("Clearing cache at '" . Cache::getDirectory() ."'");
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
}
}