13 if (!defined(
'JPATH_PLATFORM'))
15 define(
'JPATH_PLATFORM', __DIR__);
19 $os = strtoupper(substr(PHP_OS, 0, 3));
21 if (!defined(
'IS_WIN'))
23 define(
'IS_WIN', (
$os ===
'WIN') ?
true :
false);
25 if (!defined(
'IS_UNIX'))
27 define(
'IS_UNIX', (IS_WIN ===
false) ?
true :
false);
31 if (!class_exists(
'JPlatform'))
33 require_once JPATH_PLATFORM .
'/platform.php';
37 if (!class_exists(
'JLoader'))
39 require_once JPATH_PLATFORM .
'/loader.php';
43 if (!class_exists(
'JLoader'))
45 throw new RuntimeException(
'Joomla Platform not loaded.');
55 if (version_compare(PHP_VERSION,
'5.4.0',
'<'))
57 JLoader::register(
'JsonSerializable', JPATH_PLATFORM .
'/compat/jsonserializable.php');