/index.php

https://bitbucket.org/eternaware/joomus · PHP · 54 lines · 21 code · 15 blank · 18 comment · 2 complexity · bbca4df2137835ff50a059933726802d MD5 · raw file

  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. // Set flag that this is a parent file.
  9. const _JEXEC = 1;
  10. if (file_exists(__DIR__ . '/defines.php')) {
  11. include_once __DIR__ . '/defines.php';
  12. }
  13. if (!defined('_JDEFINES')) {
  14. define('JPATH_BASE', __DIR__);
  15. require_once JPATH_BASE.'/includes/defines.php';
  16. }
  17. require_once JPATH_BASE.'/includes/framework.php';
  18. // Mark afterLoad in the profiler.
  19. JDEBUG ? $_PROFILER->mark('afterLoad') : null;
  20. // Instantiate the application.
  21. $app = JFactory::getApplication('site');
  22. // Initialise the application.
  23. $app->initialise();
  24. // Mark afterIntialise in the profiler.
  25. JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
  26. // Route the application.
  27. $app->route();
  28. // Mark afterRoute in the profiler.
  29. JDEBUG ? $_PROFILER->mark('afterRoute') : null;
  30. // Dispatch the application.
  31. $app->dispatch();
  32. // Mark afterDispatch in the profiler.
  33. JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
  34. // Render the application.
  35. $app->render();
  36. // Mark afterRender in the profiler.
  37. JDEBUG ? $_PROFILER->mark('afterRender') : null;
  38. // Return the response.
  39. echo $app;