[ 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\thumbnail; 14 15 use Symfony\Component\Console\Input\InputInterface; 16 use Symfony\Component\Console\Input\ArrayInput; 17 use Symfony\Component\Console\Output\OutputInterface; 18 19 class recreate extends \phpbb\console\command\command 20 { 21 /** 22 * Sets the command name and description 23 * 24 * @return null 25 */ 26 protected function configure() 27 { 28 $this 29 ->setName('thumbnail:recreate') 30 ->setDescription($this->user->lang('CLI_DESCRIPTION_THUMBNAIL_RECREATE')) 31 ; 32 } 33 34 /** 35 * Executes the command thumbnail:recreate. 36 * 37 * This command is a "macro" to execute thumbnail:delete and then thumbnail:generate. 38 * 39 * @param InputInterface $input The input stream used to get the argument and verboe option. 40 * @param OutputInterface $output The output stream, used for printing verbose-mode and error information. 41 * 42 * @return int 0 if all is ok, 1 if a thumbnail couldn't be deleted. 43 */ 44 protected function execute(InputInterface $input, OutputInterface $output) 45 { 46 $parameters = array( 47 'command' => 'thumbnail:delete' 48 ); 49 50 if ($input->getOption('verbose')) 51 { 52 $parameters['-' . str_repeat('v', $output->getVerbosity() - 1)] = true; 53 } 54 55 $this->getApplication()->setAutoExit(false); 56 57 $input_delete = new ArrayInput($parameters); 58 $return = $this->getApplication()->run($input_delete, $output); 59 60 if ($return === 0) 61 { 62 $parameters['command'] = 'thumbnail:generate'; 63 64 $input_create = new ArrayInput($parameters); 65 $return = $this->getApplication()->run($input_create, $output); 66 } 67 68 $this->getApplication()->setAutoExit(true); 69 70 return $return; 71 } 72 }
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 |