[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Installation 5 * @subpackage Application 6 * 7 * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 // Define the base path and require the other defines 14 define('JPATH_BASE', dirname(__DIR__)); 15 16 require_once __DIR__ . '/defines.php'; 17 18 // Check for presence of vendor dependencies not included in the git repository 19 if (!file_exists(JPATH_LIBRARIES . '/vendor/autoload.php') || !is_dir(JPATH_ROOT . '/media/vendor')) { 20 echo file_get_contents(JPATH_ROOT . '/templates/system/build_incomplete.html'); 21 22 exit; 23 } 24 25 // Launch the application 26 require_once __DIR__ . '/framework.php'; 27 28 // Check if the default log directory can be written to, add a logger for errors to use it 29 if (is_writable(JPATH_ADMINISTRATOR . '/logs')) { 30 \Joomla\CMS\Log\Log::addLogger( 31 [ 32 'format' => '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}', 33 'text_file' => 'error.php' 34 ], 35 \Joomla\CMS\Log\Log::ALL, 36 ['error'] 37 ); 38 } 39 40 // Register the Installation application 41 JLoader::registerNamespace('Joomla\\CMS\\Installation', JPATH_INSTALLATION . '/src', false, false); 42 43 JLoader::registerAlias('JRouterInstallation', \Joomla\CMS\Installation\Router\InstallationRouter::class); 44 45 // Get the dependency injection container 46 $container = \Joomla\CMS\Factory::getContainer(); 47 $container->registerServiceProvider(new \Joomla\CMS\Installation\Service\Provider\Application()); 48 49 /* 50 * Alias the session service keys to the web session service as that is the primary session backend for this application 51 * 52 * In addition to aliasing "common" service keys, we also create aliases for the PHP classes to ensure autowiring objects 53 * is supported. This includes aliases for aliased class names, and the keys for aliased class names should be considered 54 * deprecated to be removed when the class name alias is removed as well. 55 */ 56 $container->alias('session.web', 'session.web.installation') 57 ->alias('session', 'session.web.installation') 58 ->alias('JSession', 'session.web.installation') 59 ->alias(\Joomla\CMS\Session\Session::class, 'session.web.installation') 60 ->alias(\Joomla\Session\Session::class, 'session.web.installation') 61 ->alias(\Joomla\Session\SessionInterface::class, 'session.web.installation'); 62 63 // Instantiate and execute the application 64 $container->get(\Joomla\CMS\Installation\Application\InstallationApplication::class)->execute();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |