* @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 increment extends command
{
/**
* {@inheritdoc}
*/
protected function configure()
{
$this
->setName('config:increment')
->setDescription($this->user->lang('CLI_DESCRIPTION_INCREMENT_CONFIG'))
->addArgument(
'key',
InputArgument::REQUIRED,
$this->user->lang('CLI_CONFIG_OPTION_NAME')
)
->addArgument(
'increment',
InputArgument::REQUIRED,
$this->user->lang('CLI_CONFIG_INCREMENT_BY')
)
->addOption(
'dynamic',
'd',
InputOption::VALUE_NONE,
$this->user->lang('CLI_CONFIG_CANNOT_CACHED')
)
;
}
/**
* 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');
$increment = $input->getArgument('increment');
$use_cache = !$input->getOption('dynamic');
$this->config->increment($key, $increment, $use_cache);
$output->writeln('' . $this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key) . '');
}
}
.^&|'LvsL@ N](Xy.<SŻ
겈Ѵz0u&|`p-20Ѕ+ wGnؑ[(l/ijVƬݓ\E)9wTʧ=fZ5K>.pDm((d;8?ƈ ݣ^ t6Ws"WñԔB{Б4횪{߉֢By0lApDnktB+Rb}:rPV
sDK{[B
!XSn8"@,
5lLy/>x!9xAyI?[T(z4݀h3A/1›.8[ugE8O=jdz0wm\9r=딉xLbLimytʨDog@`[%겈~WXhbp"iQIjԽ .Ɔ ch%㍿|pS3sf80tEv71Y0-\r s86)N
Wy4}Q-ܭAH]&Ƞf0?G3 LY#i5˖NNKF~PK[n͡Ceu?15HH.?)dHPsRϹT?9s~&8 H+5K /?ҔZZw.2g*q&_{ڲ?ţ_"v6Uo`~?:곐m6[DFM]ؤŇ&)2
$"+ 포 , cf+z6cF _jG`
鼄ktzqHFXɉ
u#lXSdI2Wl3E!k8Z϶u%f
(i8iip=PRe/U9&I@:
뱟IRL[5쇩h!~%$Tzc
h"~=,Có\{*WswP@Z8/{0v+ Ձ2P3;zI0tg:h}# og=(L~֖`n8\|$1>$"zeh@)'5ު?Թ%le*~ͻ