[ Index ] |
PHP Cross Reference of phpBB-3.1.12-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\extension; 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 purge extends command 20 { 21 protected function configure() 22 { 23 $this 24 ->setName('extension:purge') 25 ->setDescription($this->user->lang('CLI_DESCRIPTION_PURGE_EXTENSION')) 26 ->addArgument( 27 'extension-name', 28 InputArgument::REQUIRED, 29 $this->user->lang('CLI_EXTENSION_NAME') 30 ) 31 ; 32 } 33 34 protected function execute(InputInterface $input, OutputInterface $output) 35 { 36 $name = $input->getArgument('extension-name'); 37 $this->manager->purge($name); 38 $this->manager->load_extensions(); 39 40 if ($this->manager->is_enabled($name)) 41 { 42 $output->writeln('<error>' . $this->user->lang('CLI_EXTENSION_PURGE_FAILURE', $name) . '</error>'); 43 return 1; 44 } 45 else 46 { 47 $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_PURGE', time(), array($name)); 48 $output->writeln('<info>' . $this->user->lang('CLI_EXTENSION_PURGE_SUCCESS', $name) . '</info>'); 49 return 0; 50 } 51 } 52 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |