forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
platform.php
91 lines (76 loc) · 2.19 KB
/
platform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* @package Joomla.Platform
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* Version information class for the Joomla Platform.
*
* @package Joomla.Platform
* @since 11.1
*/
final class JPlatform
{
// Product name.
const PRODUCT = 'Joomla Platform';
// Release version.
const RELEASE = '13.1';
// Maintenance version.
const MAINTENANCE = '0';
// Development STATUS.
const STATUS = 'Stable';
// Build number.
const BUILD = 0;
// Code name.
const CODE_NAME = 'Curiosity';
// Release date.
const RELEASE_DATE = '24-Apr-2013';
// Release time.
const RELEASE_TIME = '00:00';
// Release timezone.
const RELEASE_TIME_ZONE = 'GMT';
// Copyright Notice.
const COPYRIGHT = 'Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.';
// Link text.
const LINK_TEXT = '<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the GNU General Public License.';
/**
* Compares two a "PHP standardized" version number against the current Joomla Platform version.
*
* @param string $minimum The minimum version of the Joomla Platform which is compatible.
*
* @return boolean True if the version is compatible.
*
* @see http://www.php.net/version_compare
* @since 11.1
*/
public static function isCompatible($minimum)
{
return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
}
/**
* Gets a "PHP standardized" version string for the current Joomla Platform.
*
* @return string Version string.
*
* @since 11.1
*/
public static function getShortVersion()
{
return self::RELEASE . '.' . self::MAINTENANCE;
}
/**
* Gets a version string for the current Joomla Platform with all release information.
*
* @return string Complete version string.
*
* @since 11.1
*/
public static function getLongVersion()
{
return self::PRODUCT . ' ' . self::RELEASE . '.' . self::MAINTENANCE . ' ' . self::STATUS . ' [ ' . self::CODE_NAME . ' ] '
. self::RELEASE_DATE . ' ' . self::RELEASE_TIME . ' ' . self::RELEASE_TIME_ZONE;
}
}