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 |
delete.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\Output\OutputInterface;
18
19 class delete extends command
20 {
21 /**
22 * {@inheritdoc}
23 */
24 protected function configure()
25 {
26 $this
27 ->setName('config:delete')
28 ->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG'))
29 ->addArgument(
30 'key',
31 InputArgument::REQUIRED,
32 $this->user->lang('CLI_CONFIG_OPTION_NAME')
33 )
34 ;
35 }
36
37 /**
38 * Executes the command config:delete.
39 *
40 * Removes a configuration option
41 *
42 * @param InputInterface $input An InputInterface instance
43 * @param OutputInterface $output An OutputInterface instance
44 *
45 * @return null
46 * @see \phpbb\config\config::delete()
47 */
48 protected function execute(InputInterface $input, OutputInterface $output)
49 {
50 $key = $input->getArgument('key');
51
52 if (isset($this->config[$key]))
53 {
54 $this->config->delete($key);
55
56 $output->writeln('<info>' . $this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key) . '</info>');
57 }
58 else
59 {
60 $output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>');
61 }
62 }
63 }
64