| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Platform 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 7 */ 8 9 // Set the platform root path as a constant if necessary. 10 if (!defined('JPATH_PLATFORM')) 11 { 12 define('JPATH_PLATFORM', dirname(__FILE__)); 13 } 14 15 // Set the directory separator define if necessary. 16 if (!defined('DS')) 17 { 18 define('DS', DIRECTORY_SEPARATOR); 19 } 20 21 // Detect the native operating system type. 22 $os = strtoupper(substr(PHP_OS, 0, 3)); 23 if (!defined('IS_WIN')) 24 { 25 define('IS_WIN', ($os === 'WIN') ? true : false); 26 } 27 if (!defined('IS_MAC')) 28 { 29 define('IS_MAC', ($os === 'MAC') ? true : false); 30 } 31 if (!defined('IS_UNIX')) 32 { 33 define('IS_UNIX', (($os !== 'MAC') && ($os !== 'WIN')) ? true : false); 34 } 35 36 // Import the platform version library if necessary. 37 if (!class_exists('JPlatform')) 38 { 39 require_once JPATH_PLATFORM . '/platform.php'; 40 } 41 42 // Import the library loader if necessary. 43 if (!class_exists('JLoader')) 44 { 45 require_once JPATH_PLATFORM . '/loader.php'; 46 } 47 48 class_exists('JLoader') or die; 49 50 // Setup the autoloaders. 51 JLoader::setup(); 52 53 /** 54 * Import the base Joomla Platform libraries. 55 */ 56 57 // Import the factory library. 58 JLoader::import('joomla.factory'); 59 60 // Import the exception and error handling libraries. 61 JLoader::import('joomla.error.exception'); 62 63 /* 64 * If the HTTP_HOST environment variable is set we assume a Web request and 65 * thus we import the request library and most likely clean the request input. 66 */ 67 if (isset($_SERVER['HTTP_HOST'])) 68 { 69 JLoader::register('JRequest', JPATH_PLATFORM . '/joomla/environment/request.php'); 70 71 // If an application flags it doesn't want this, adhere to that. 72 if (!defined('_JREQUEST_NO_CLEAN') && (bool) ini_get('register_globals')) 73 { 74 JRequest::clean(); 75 } 76 } 77 78 // Import the base object library. 79 JLoader::import('joomla.base.object'); 80 81 // Register classes that don't follow one file per class naming conventions. 82 JLoader::register('JText', JPATH_PLATFORM . '/joomla/methods.php'); 83 JLoader::register('JRoute', JPATH_PLATFORM . '/joomla/methods.php');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |