Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 63 lines (52 sloc) 1.713 kb
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
1 <?php
2 /**
eda07a6 @LouisLandry Cleaning up bootstrap/import files and adding gc_disable() to PHPUnit
LouisLandry authored
3 * Bootstrap file for the Joomla Platform. Including this file into your application will make Joomla
4 * Platform libraries available for use.
5 *
608c1da @mbabker CodeSniff on base libraries files
mbabker authored
6 * @package Joomla.Platform
0a72863 @LouisLandry Fixing file headers for both unit test and library files.
LouisLandry authored
7 *
93d90a7 @mbabker Update copyright notices for 2013
mbabker authored
8 * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
608c1da @mbabker CodeSniff on base libraries files
mbabker authored
9 * @license GNU General Public License version 2 or later; see LICENSE
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
10 */
11
12 // Set the platform root path as a constant if necessary.
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
13 if (!defined('JPATH_PLATFORM'))
14 {
133d981 @realityking Replace all occurences of dirname(__FILE__) with __DIR__.
realityking authored
15 define('JPATH_PLATFORM', __DIR__);
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
16 }
17
18 // Detect the native operating system type.
19 $os = strtoupper(substr(PHP_OS, 0, 3));
a3fef21 @ianmacl Code style fixes.
ianmacl authored
20
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
21 if (!defined('IS_WIN'))
22 {
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
23 define('IS_WIN', ($os === 'WIN') ? true : false);
24 }
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
25 if (!defined('IS_UNIX'))
26 {
c00d1d8 @dongilbert Deprecating IS_MAC in favor of IS_UNIX
dongilbert authored
27 define('IS_UNIX', (IS_WIN === false) ? true : false);
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
28 }
29
30 // Import the platform version library if necessary.
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
31 if (!class_exists('JPlatform'))
32 {
33 require_once JPATH_PLATFORM . '/platform.php';
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
34 }
35
36 // Import the library loader if necessary.
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
37 if (!class_exists('JLoader'))
38 {
39 require_once JPATH_PLATFORM . '/loader.php';
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
40 }
41
eda07a6 @LouisLandry Cleaning up bootstrap/import files and adding gc_disable() to PHPUnit
LouisLandry authored
42 // Make sure that the Joomla Platform has been successfully loaded.
43 if (!class_exists('JLoader'))
44 {
45 throw new RuntimeException('Joomla Platform not loaded.');
46 }
fc5a10c @realityking Unify the style of the JPATH_PLATFORM check.
realityking authored
47
1a7caa4 @LouisLandry Some minor adjustments to the Joomla Loader class and import file.
LouisLandry authored
48 // Setup the autoloaders.
49 JLoader::setup();
50
a76ed4b @realityking Remove JRequest:clean().
realityking authored
51 // Import the base Joomla Platform libraries.
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
52 JLoader::import('joomla.factory');
a76ed4b @realityking Remove JRequest:clean().
realityking authored
53
269dc02 @realityking Implement the JsonSerializable interface in JRegistry while maintaining ...
realityking authored
54 // Register classes for compatability with PHP 5.3
55 if (version_compare(PHP_VERSION, '5.4.0', '<'))
56 {
0f0beb4 @LouisLandry Adding the compat libraries to the phar package definitions.
LouisLandry authored
57 JLoader::register('JsonSerializable', JPATH_PLATFORM . '/compat/jsonserializable.php');
269dc02 @realityking Implement the JsonSerializable interface in JRegistry while maintaining ...
realityking authored
58 }
59
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
60 // Register classes that don't follow one file per class naming conventions.
bf15347 @realityking Split methods.php into two files.
realityking authored
61 JLoader::register('JText', JPATH_PLATFORM . '/joomla/language/text.php');
62 JLoader::register('JRoute', JPATH_PLATFORM . '/joomla/application/route.php');
Something went wrong with that request. Please try again.