[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 #!/usr/bin/env php 2 <?php 3 /** 4 * 5 * This file is part of the phpBB Forum Software package. 6 * 7 * @copyright (c) phpBB Limited <https://www.phpbb.com> 8 * @license GNU General Public License, version 2 (GPL-2.0) 9 * 10 * For full copyright and license information, please see 11 * the docs/CREDITS.txt file. 12 * 13 */ 14 15 use Symfony\Component\Console\Input\ArgvInput; 16 17 if (php_sapi_name() != 'cli') 18 { 19 echo 'This program must be run from the command line.' . PHP_EOL; 20 exit(1); 21 } 22 23 define('IN_PHPBB', true); 24 25 $phpbb_root_path = __DIR__ . '/../'; 26 $phpEx = substr(strrchr(__FILE__, '.'), 1); 27 require($phpbb_root_path . 'includes/startup.' . $phpEx); 28 require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); 29 30 $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); 31 $phpbb_class_loader->register(); 32 33 $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); 34 extract($phpbb_config_php_file->get_all()); 35 36 if (!defined('PHPBB_ENVIRONMENT')) 37 { 38 @define('PHPBB_ENVIRONMENT', 'production'); 39 } 40 41 require($phpbb_root_path . 'includes/constants.' . $phpEx); 42 require($phpbb_root_path . 'includes/functions.' . $phpEx); 43 require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); 44 require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); 45 require($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx); 46 47 $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); 48 $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file); 49 50 $input = new ArgvInput(); 51 52 if ($input->hasParameterOption(array('--env'))) 53 { 54 $phpbb_container_builder->with_environment($input->getParameterOption('--env')); 55 } 56 57 if ($input->hasParameterOption(array('--safe-mode'))) 58 { 59 $phpbb_container_builder->without_extensions(); 60 $phpbb_container_builder->without_cache(); 61 } 62 else 63 { 64 $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); 65 $phpbb_class_loader_ext->register(); 66 } 67 68 $phpbb_container = $phpbb_container_builder->get_container(); 69 $phpbb_container->get('request')->enable_super_globals(); 70 require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); 71 72 register_compatibility_globals(); 73 74 /** @var \phpbb\config\config $config */ 75 $config = $phpbb_container->get('config'); 76 77 /** @var \phpbb\language\language $language */ 78 $language = $phpbb_container->get('language'); 79 $language->set_default_language($config['default_lang']); 80 $language->add_lang(array('common', 'acp/common', 'cli')); 81 82 /* @var $user \phpbb\user */ 83 $user = $phpbb_container->get('user'); 84 $user->data['user_id'] = ANONYMOUS; 85 $user->ip = '127.0.0.1'; 86 87 $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $language, $config); 88 $application->setDispatcher($phpbb_container->get('dispatcher')); 89 $application->register_container_commands($phpbb_container->get('console.command_collection')); 90 $application->run($input);
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 |