/index.php
PHP | 54 lines | 21 code | 15 blank | 18 comment | 2 complexity | bbca4df2137835ff50a059933726802d MD5 | raw file
Possible License(s): LGPL-2.1
1<?php 2/** 3 * @package Joomla.Site 4 * 5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 9// Set flag that this is a parent file. 10const _JEXEC = 1; 11 12if (file_exists(__DIR__ . '/defines.php')) { 13 include_once __DIR__ . '/defines.php'; 14} 15 16if (!defined('_JDEFINES')) { 17 define('JPATH_BASE', __DIR__); 18 require_once JPATH_BASE.'/includes/defines.php'; 19} 20 21require_once JPATH_BASE.'/includes/framework.php'; 22 23// Mark afterLoad in the profiler. 24JDEBUG ? $_PROFILER->mark('afterLoad') : null; 25 26// Instantiate the application. 27$app = JFactory::getApplication('site'); 28 29// Initialise the application. 30$app->initialise(); 31 32// Mark afterIntialise in the profiler. 33JDEBUG ? $_PROFILER->mark('afterInitialise') : null; 34 35// Route the application. 36$app->route(); 37 38// Mark afterRoute in the profiler. 39JDEBUG ? $_PROFILER->mark('afterRoute') : null; 40 41// Dispatch the application. 42$app->dispatch(); 43 44// Mark afterDispatch in the profiler. 45JDEBUG ? $_PROFILER->mark('afterDispatch') : null; 46 47// Render the application. 48$app->render(); 49 50// Mark afterRender in the profiler. 51JDEBUG ? $_PROFILER->mark('afterRender') : null; 52 53// Return the response. 54echo $app;