[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * 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 use Symfony\Component\Console\Style\SymfonyStyle; 19 20 class delete extends command 21 { 22 /** 23 * {@inheritdoc} 24 */ 25 protected function configure() 26 { 27 $this 28 ->setName('config:delete') 29 ->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG')) 30 ->addArgument( 31 'key', 32 InputArgument::REQUIRED, 33 $this->user->lang('CLI_CONFIG_OPTION_NAME') 34 ) 35 ; 36 } 37 38 /** 39 * Executes the command config:delete. 40 * 41 * Removes a configuration option 42 * 43 * @param InputInterface $input An InputInterface instance 44 * @param OutputInterface $output An OutputInterface instance 45 * 46 * @return void 47 * @see \phpbb\config\config::delete() 48 */ 49 protected function execute(InputInterface $input, OutputInterface $output) 50 { 51 $io = new SymfonyStyle($input, $output); 52 53 $key = $input->getArgument('key'); 54 55 if (isset($this->config[$key])) 56 { 57 $this->config->delete($key); 58 59 $io->success($this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key)); 60 } 61 else 62 { 63 $io->error($this->user->lang('CLI_CONFIG_NOT_EXISTS', $key)); 64 } 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |