Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 69 lines (56 sloc) 1.857 kb
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
1 <?php
2 /**
eda07a6 Louis Landry Cleaning up bootstrap/import files and adding gc_disable() to PHPUnit
LouisLandry authored
3 * Bootstrap file for the Joomla Platform. This file becomes the PHAR stub when the platform is built
4 * into a single deployable archive to be used in Joomla applications.
5 *
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
6 * @package Joomla.Platform
7 *
93d90a7 Michael Babker Update copyright notices for 2013
mbabker authored
8 * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
9 * @license GNU General Public License version 2 or later; see LICENSE
10 */
11
12 // Setup the Pharsanity!
13 Phar::interceptFileFuncs();
14
15 // Set the platform root path as a constant if necessary.
16 if (!defined('JPATH_PLATFORM'))
17 {
18 define('JPATH_PLATFORM', 'phar://' . __FILE__);
19 }
20
21 // Detect the native operating system type.
22 $os = strtoupper(substr(PHP_OS, 0, 3));
a3fef21 ianmacl Code style fixes.
ianmacl authored
23
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
24 if (!defined('IS_WIN'))
25 {
26 define('IS_WIN', ($os === 'WIN') ? true : false);
27 }
28 if (!defined('IS_UNIX'))
29 {
eda07a6 Louis Landry Cleaning up bootstrap/import files and adding gc_disable() to PHPUnit
LouisLandry authored
30 define('IS_UNIX', (IS_WIN === false) ? true : false);
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
31 }
32
33 // Import the platform version library if necessary.
34 if (!class_exists('JPlatform'))
35 {
36 require_once JPATH_PLATFORM . '/platform.php';
37 }
38
39 // Import the library loader if necessary.
40 if (!class_exists('JLoader'))
41 {
42 require_once JPATH_PLATFORM . '/loader.php';
43 }
44
45 // Make sure that the Joomla Platform has been successfully loaded.
46 if (!class_exists('JLoader'))
47 {
48 throw new RuntimeException('Joomla Platform not loaded.');
49 }
50
51 // Setup the autoloaders.
52 JLoader::setup();
53
54 // Import the base Joomla Platform libraries.
55 JLoader::import('joomla.factory');
56
0f0beb4 Louis Landry Adding the compat libraries to the phar package definitions.
LouisLandry authored
57 // Register classes for compatability with PHP 5.3
58 if (version_compare(PHP_VERSION, '5.4.0', '<'))
59 {
60 JLoader::register('JsonSerializable', JPATH_PLATFORM . '/compat/jsonserializable.php');
61 }
62
e441c20 Louis Landry Making some initial adjustments and additions for Phar packaging.
LouisLandry authored
63 // Register classes that don't follow one file per class naming conventions.
64 JLoader::register('JText', JPATH_PLATFORM . '/joomla/language/text.php');
65 JLoader::register('JRoute', JPATH_PLATFORM . '/joomla/application/route.php');
66
67 // End of the Phar Stub.
93d90a7 Michael Babker Update copyright notices for 2013
mbabker authored
68 __HALT_COMPILER();?>
Something went wrong with that request. Please try again.