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 |
get.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 get extends command
21 {
22 /**
23 * {@inheritdoc}
24 */
25 protected function configure()
26 {
27 $this
28 ->setName('config:get')
29 ->setDescription($this->user->lang('CLI_DESCRIPTION_GET_CONFIG'))
30 ->addArgument(
31 'key',
32 InputArgument::REQUIRED,
33 $this->user->lang('CLI_CONFIG_OPTION_NAME')
34 )
35 ->addOption(
36 'no-newline',
37 null,
38 InputOption::VALUE_NONE,
39 $this->user->lang('CLI_CONFIG_PRINT_WITHOUT_NEWLINE')
40 )
41 ;
42 }
43
44 /**
45 * Executes the command config:get.
46 *
47 * Retrieves a configuration value.
48 *
49 * @param InputInterface $input An InputInterface instance
50 * @param OutputInterface $output An OutputInterface instance
51 *
52 * @return null
53 * @see \phpbb\config\config::offsetGet()
54 */
55 protected function execute(InputInterface $input, OutputInterface $output)
56 {
57 $key = $input->getArgument('key');
58
59 if (isset($this->config[$key]) && $input->getOption('no-newline'))
60 {
61 $output->write($this->config[$key]);
62 }
63 else if (isset($this->config[$key]))
64 {
65 $output->writeln($this->config[$key]);
66 }
67 else
68 {
69 $output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>');
70 }
71 }
72 }
73