Elgg  Version 4.3
CacheClearCommand.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Cli;
4 
8 class CacheClearCommand extends Command {
9 
13  protected function configure() {
14  $this->setName('cache:clear')
15  ->setDescription(elgg_echo('cli:cache:clear:description'));
16  }
17 
21  protected function command() {
22 
24 
25  if (!$this->option('quiet')) {
26  $this->write(elgg_echo('admin:cache:cleared'));
27  }
28 
29  return 0;
30  }
31 }
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
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:clear
option($name)
Returns option value.
elgg_clear_caches()
Clear all the registered caches.
Definition: cache.php:198