[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.API 5 * 6 * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10 defined('_JEXEC') or die; 11 12 // Saves the start time and memory usage. 13 $startTime = microtime(1); 14 $startMem = memory_get_usage(); 15 16 if (file_exists(dirname(__DIR__) . '/defines.php')) { 17 include_once dirname(__DIR__) . '/defines.php'; 18 } 19 20 if (!defined('_JDEFINES')) { 21 define('JPATH_BASE', dirname(__DIR__)); 22 require_once JPATH_BASE . '/includes/defines.php'; 23 } 24 25 require_once JPATH_BASE . '/includes/framework.php'; 26 27 // Set profiler start time and memory usage and mark afterLoad in the profiler. 28 JDEBUG && \Joomla\CMS\Profiler\Profiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad'); 29 30 // Boot the DI container 31 $container = \Joomla\CMS\Factory::getContainer(); 32 33 /* 34 * Alias the session service keys to the web session service as that is the primary session backend for this application 35 * 36 * In addition to aliasing "common" service keys, we also create aliases for the PHP classes to ensure autowiring objects 37 * is supported. This includes aliases for aliased class names, and the keys for aliased class names should be considered 38 * deprecated to be removed when the class name alias is removed as well. 39 */ 40 $container->alias('session', 'session.cli') 41 ->alias('JSession', 'session.cli') 42 ->alias(\Joomla\CMS\Session\Session::class, 'session.cli') 43 ->alias(\Joomla\Session\Session::class, 'session.cli') 44 ->alias(\Joomla\Session\SessionInterface::class, 'session.cli'); 45 46 // Instantiate the application. 47 $app = $container->get(\Joomla\CMS\Application\ApiApplication::class); 48 49 // Set the application as global app 50 \Joomla\CMS\Factory::$application = $app; 51 52 // Execute the application. 53 $app->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 |