Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
set.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13 namespace phpbb\console\command\config;
14
15 use Symfony\Component\Console\Input\InputArgument;
16 use Symfony\Component\Console\Input\InputInterface;
17 use Symfony\Component\Console\Input\InputOption;
18 use Symfony\Component\Console\Output\OutputInterface;
19
20 class set extends command
21 {
22 /**
23 * {@inheritdoc}
24 */
25 protected function configure()
26 {
27 $this
28 ->setName('config:set')
29 ->setDescription($this->user->lang('CLI_DESCRIPTION_SET_CONFIG'))
30 ->addArgument(
31 'key',
32 InputArgument::REQUIRED,
33 $this->user->lang('CLI_CONFIG_OPTION_NAME')
34 )
35 ->addArgument(
36 'value',
37 InputArgument::REQUIRED,
38 $this->user->lang('CLI_CONFIG_NEW')
39 )
40 ->addOption(
41 'dynamic',
42 'd',
43 InputOption::VALUE_NONE,
44 $this->user->lang('CLI_CONFIG_CANNOT_CACHED')
45 )
46 ;
47 }
48
49 /**
50 * Executes the command config:set.
51 *
52 * Sets a configuration option's value.
53 *
54 * @param InputInterface $input An InputInterface instance
55 * @param OutputInterface $output An OutputInterface instance
56 *
57 * @return null
58 * @see \phpbb\config\config::set()
59 */
60 protected function execute(InputInterface $input, OutputInterface $output)
61 {
62 $key = $input->getArgument('key');
63 $value = $input->getArgument('value');
64 $use_cache = !$input->getOption('dynamic');
65
66 $this->config->set($key, $value, $use_cache);
67
68 $output->writeln('<info>' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . '</info>');
69 }
70 }
71