* @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("Increments a configuration option's value")
->addArgument(
'key',
InputArgument::REQUIRED,
"The configuration option's name"
)
->addArgument(
'increment',
InputArgument::REQUIRED,
'Amount to increment by'
)
->addOption(
'dynamic',
'd',
InputOption::VALUE_NONE,
'Set this option if the configuration option changes too frequently to be efficiently 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("Successfully incremented config $key");
}
}
Fˣ%C"~{h'M,YLJ.~`k;m"-^-.Fe^9fXmHF̪_]cd2?D=.5afg
WLǛ~UȎ5.rq]S"OuԆ:dnhG0Hv)\Ãf m{ltzi|/&Nn^v?*+ ,WN d{!DZ
'n.b!
dW4V=P}lG&p=1c=*rb!64Ba4YruP/jdwWvV(-k9hS=:ot0>$Ԫ6B\Tv|_AnE54ĠKCPfeUK_~ԷQxI!!+qW'Zto/ZȒL"o > V@|W/pc=vC\⢩Kؓ^(B UWb6&FhyNe]>x|6LS_aFHtmÖ^z>m̰ٞgl{hnk@wװERFuA|dI(CG_XZDkML}^KfWZxW6`밚m&Y
7%L_Di5#Ɏϊ\uuKDZ#ZUA
#`m{
$xXnyI]
wVqRLflF_1Vq][IPLD HVDoZ`Ub@KIk]]tIG]즻WRIk$g5dNBT KamY*&
Âý9=F|}Y/^1
}}%
83,ҏ&@Dt9v۪o=&ipLTs>_mGIqh8$+zr)Mvuok
"W5o`t'+uK-Q+òQzQJ Gɹ:4hI6$Nk ""ܹm.'<,
.̾-`|TNv5ș&s\
IP5ox77fY[.3D"߯L0Sjwӂ-Z̪EAEm,o5Ux$$@jBh4TX7̑Ut$>THCo E=~7q(5UTdڈbAłGwe2&:ջigI%dʀ