aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/console')
-rw-r--r--phpBB/phpbb/console/command/cache/purge.php23
-rw-r--r--phpBB/phpbb/console/command/config/delete.php15
-rw-r--r--phpBB/phpbb/console/command/config/get.php14
-rw-r--r--phpBB/phpbb/console/command/config/increment.php14
-rw-r--r--phpBB/phpbb/console/command/config/set.php14
-rw-r--r--phpBB/phpbb/console/command/config/set_atomic.php15
-rw-r--r--phpBB/phpbb/console/command/cron/cron_list.php25
-rw-r--r--phpBB/phpbb/console/command/cron/run.php7
8 files changed, 122 insertions, 5 deletions
diff --git a/phpBB/phpbb/console/command/cache/purge.php b/phpBB/phpbb/console/command/cache/purge.php
index 50953185a4..379d2aa1ca 100644
--- a/phpBB/phpbb/console/command/cache/purge.php
+++ b/phpBB/phpbb/console/command/cache/purge.php
@@ -35,6 +35,16 @@ class purge extends \phpbb\console\command\command
/** @var \phpbb\config\config */
protected $config;
+ /**
+ * Constructor
+ *
+ * @param \phpbb\cache\driver\driver_interface $cache Cache instance
+ * @param \phpbb\db\driver\driver_interface $db Database connection
+ * @param \phpbb\auth\auth $auth Auth instance
+ * @param \phpbb\log\log $log Logger instance
+ * @param \phpbb\user $user User instance
+ * @param \phpbb\config\config $config Config instance
+ */
public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\log\log $log, \phpbb\user $user, \phpbb\config\config $config)
{
$this->cache = $cache;
@@ -46,6 +56,9 @@ class purge extends \phpbb\console\command\command
parent::__construct();
}
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -54,6 +67,16 @@ class purge extends \phpbb\console\command\command
;
}
+ /**
+ * Executes the command cache:purge.
+ *
+ * Purge the cache (including permissions) and increment the asset_version number
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->config->increment('assets_version', 1);
diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php
index e29afdbf82..1310bb18b4 100644
--- a/phpBB/phpbb/console/command/config/delete.php
+++ b/phpBB/phpbb/console/command/config/delete.php
@@ -14,11 +14,13 @@ namespace phpbb\console\command\config;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class delete extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -32,6 +34,17 @@ class delete extends command
;
}
+ /**
+ * Executes the command config:delete.
+ *
+ * Removes a configuration option
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::delete()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php
index 0ed2a12608..20164f0da1 100644
--- a/phpBB/phpbb/console/command/config/get.php
+++ b/phpBB/phpbb/console/command/config/get.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class get extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -38,6 +41,17 @@ class get extends command
;
}
+ /**
+ * Executes the command config:get.
+ *
+ * Retrieves a configuration value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::offsetGet()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php
index 64b5d42b9d..21f0660e61 100644
--- a/phpBB/phpbb/console/command/config/increment.php
+++ b/phpBB/phpbb/console/command/config/increment.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class increment extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -43,6 +46,17 @@ class increment extends command
;
}
+ /**
+ * Executes the command config:increment.
+ *
+ * Increments an integer configuration value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::increment()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php
index fce1edb93e..587b7fb0de 100644
--- a/phpBB/phpbb/console/command/config/set.php
+++ b/phpBB/phpbb/console/command/config/set.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class set extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -43,6 +46,17 @@ class set extends command
;
}
+ /**
+ * Executes the command config:set.
+ *
+ * Sets a configuration option's value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::set()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php
index 4df2d90722..a7a52155f9 100644
--- a/phpBB/phpbb/console/command/config/set_atomic.php
+++ b/phpBB/phpbb/console/command/config/set_atomic.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class set_atomic extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -48,6 +51,18 @@ class set_atomic extends command
;
}
+ /**
+ * Executes the command config:set-atomic.
+ *
+ * Sets a configuration option's value only if the old_value matches the
+ * current configuration value or the configuration value does not exist yet.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return bool True if the value was changed, false otherwise.
+ * @see \phpbb\config\config::set_atomic()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/cron/cron_list.php b/phpBB/phpbb/console/command/cron/cron_list.php
index 9db6a23947..4f4228d9b3 100644
--- a/phpBB/phpbb/console/command/cron/cron_list.php
+++ b/phpBB/phpbb/console/command/cron/cron_list.php
@@ -23,6 +23,12 @@ class cron_list extends \phpbb\console\command\command
/** @var \phpbb\user */
protected $user;
+ /**
+ * Constructor
+ *
+ * @param \phpbb\cron\manager $cron_manager Cron manager
+ * @param \phpbb\user $user User instance
+ */
public function __construct(\phpbb\cron\manager $cron_manager, \phpbb\user $user)
{
$this->cron_manager = $cron_manager;
@@ -30,6 +36,9 @@ class cron_list extends \phpbb\console\command\command
parent::__construct();
}
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -38,6 +47,16 @@ class cron_list extends \phpbb\console\command\command
;
}
+ /**
+ * Executes the command cron:list.
+ *
+ * Prints a list of ready and unready cron jobs.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$tasks = $this->cron_manager->get_tasks();
@@ -80,6 +99,12 @@ class cron_list extends \phpbb\console\command\command
}
}
+ /**
+ * Print a list of cron jobs
+ *
+ * @param array $tasks A list of task to display
+ * @param OutputInterface $output An OutputInterface instance
+ */
protected function print_tasks_names(array $tasks, OutputInterface $output)
{
foreach ($tasks as $task)
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
index 1029a2e085..32774bebe4 100644
--- a/phpBB/phpbb/console/command/cron/run.php
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -15,7 +15,6 @@ namespace phpbb\console\command\cron;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class run extends \phpbb\console\command\command
@@ -35,7 +34,7 @@ class run extends \phpbb\console\command\command
* @param \phpbb\cron\manager $cron_manager The cron manager containing
* the cron tasks to be executed.
* @param \phpbb\lock\db $lock_db The lock for accessing database.
- * @param \phobb\user $user The user object (used to get language information)
+ * @param \phpbb\user $user The user object (used to get language information)
*/
public function __construct(\phpbb\cron\manager $cron_manager, \phpbb\lock\db $lock_db, \phpbb\user $user)
{
@@ -102,7 +101,7 @@ class run extends \phpbb\console\command\command
}
}
- /*
+ /**
* Executes all ready cron tasks.
*
* If verbose mode is set, an info message will be printed if there is no task to
@@ -140,7 +139,7 @@ class run extends \phpbb\console\command\command
return 0;
}
- /*
+ /**
* Executes a given cron task, if it is ready.
*
* If there is a task whose name matches $task_name, it is run and 0 is returned.