Elgg  Version master
CachePurgeCommand.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Cli;
4 
8 class CachePurgeCommand extends Command {
9 
13  protected function configure() {
14  $this->setName('cache:purge')
15  ->setDescription(elgg_echo('cli:cache:purge:description'));
16  }
17 
21  protected function command() {
23 
24  if (!$this->option('quiet')) {
25  $this->write(elgg_echo('admin:cache:purged'));
26  }
27 
28  return self::SUCCESS;
29  }
30 }
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_purge_caches()
Purge all the registered caches.
Definition: cache.php:213
write($messages, $level=LogLevel::INFO)
Write messages to output buffer.
Definition: BaseCommand.php:93
Abstract command with some utility methods.
Definition: Command.php:12
elgg-cli cache:purge
option($name)
Returns option value.