diff options
Diffstat (limited to 'phpBB/phpbb/console/command/config')
| -rw-r--r-- | phpBB/phpbb/console/command/config/command.php | 10 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/delete.php | 25 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/get.php | 26 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/increment.php | 24 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/set.php | 24 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/set_atomic.php | 25 | 
6 files changed, 114 insertions, 20 deletions
diff --git a/phpBB/phpbb/console/command/config/command.php b/phpBB/phpbb/console/command/config/command.php index b105bc826d..de3fbd7fa7 100644 --- a/phpBB/phpbb/console/command/config/command.php +++ b/phpBB/phpbb/console/command/config/command.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  namespace phpbb\console\command\config; diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 9a2d00561d..1310bb18b4 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -1,20 +1,26 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  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 @@ -28,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 275c82b53f..ee8c65110e 100644 --- a/phpBB/phpbb/console/command/config/get.php +++ b/phpBB/phpbb/console/command/config/get.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  namespace phpbb\console\command\config; @@ -15,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;  class get extends command  { +	/** +	* {@inheritdoc} +	*/  	protected function configure()  	{  		$this @@ -34,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'); @@ -42,7 +60,7 @@ class get extends command  		{  			$output->write($this->config[$key]);  		} -		elseif (isset($this->config[$key])) +		else if (isset($this->config[$key]))  		{  			$output->writeln($this->config[$key]);  		} diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index bc6b63c6ff..21f0660e61 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  namespace phpbb\console\command\config; @@ -15,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;  class increment extends command  { +	/** +	* {@inheritdoc} +	*/  	protected function configure()  	{  		$this @@ -39,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 9d471a96ad..587b7fb0de 100644 --- a/phpBB/phpbb/console/command/config/set.php +++ b/phpBB/phpbb/console/command/config/set.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  namespace phpbb\console\command\config; @@ -15,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;  class set extends command  { +	/** +	* {@inheritdoc} +	*/  	protected function configure()  	{  		$this @@ -39,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 03e7a60210..a7a52155f9 100644 --- a/phpBB/phpbb/console/command/config/set_atomic.php +++ b/phpBB/phpbb/console/command/config/set_atomic.php @@ -1,9 +1,13 @@  <?php  /**  * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file.  *  */  namespace phpbb\console\command\config; @@ -15,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;  class set_atomic extends command  { +	/** +	* {@inheritdoc} +	*/  	protected function configure()  	{  		$this @@ -44,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');  | 
