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