Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (76 sloc) 2.232 kb
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
1 <?php
2 /**
0a72863 Louis Landry Fixing file headers for both unit test and library files.
LouisLandry authored
3 * @package Joomla.Platform
4 *
5 * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
6 * @license GNU General Public License version 2 or later; see LICENSE
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
7 */
8
9 defined('JPATH_PLATFORM') or die;
10
11 /**
12 * Version information class for the Joomla Platform.
13 *
14 * @package Joomla.Platform
15 * @since 11.1
16 */
6b60f72 Andrew Eddie Rename JVersion to JPlatform to avoid collion with CMS JVersion.
eddieajau authored
17 final class JPlatform
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
18 {
19 // Product name.
20 const PRODUCT = 'Joomla Platform';
21 // Release version.
4ece282 Andrew Eddie Change release to 11.2 (still under development).
eddieajau authored
22 const RELEASE = '11.2';
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
23 // Maintenance version.
24 const MAINTENANCE = '0';
25 // Development STATUS.
57d456a Louis Landry In honor of my favorite new PLT member.
LouisLandry authored
26 const STATUS = 'Stable';
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
27 // Build number.
28 const BUILD = 0;
29 // Code name.
57d456a Louis Landry In honor of my favorite new PLT member.
LouisLandry authored
30 const CODE_NAME = 'Omar';
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
31 // Release date.
57d456a Louis Landry In honor of my favorite new PLT member.
LouisLandry authored
32 const RELEASE_DATE = '27-Jul-2011';
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
33 // Release time.
34 const RELEASE_TIME = '00:00';
35 // Release timezone.
36 const RELEASE_TIME_ZONE = 'GMT';
37 // Copyright Notice.
38 const COPYRIGHT = 'Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.';
39 // Link text.
40 const LINK_TEXT = '<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the GNU General Public License.';
41
42 /**
43 * Compares two a "PHP standardized" version number against the current Joomla Platform version.
44 *
4ece282 Andrew Eddie Change release to 11.2 (still under development).
eddieajau authored
45 * @param string $minimum The minimum version of the Joomla Platform which is compatible.
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
46 *
fe90bf3 elinw applied patch
elinw authored
47 * @return boolean True if the version is compatible.
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
48 *
49 * @see http://www.php.net/version_compare
50 * @since 11.1
51 */
52 public static function isCompatible($minimum)
53 {
79a80b9 Andrew Eddie Fix JPlatform test failures.
eddieajau authored
54 return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
55 }
56
57 /**
58 * Gets a "PHP standardized" version string for the current Joomla Platform.
59 *
60 * @return string Version string.
4ece282 Andrew Eddie Change release to 11.2 (still under development).
eddieajau authored
61 *
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
62 * @since 11.1
63 */
64 public static function getShortVersion()
65 {
78e6bc0 Andrew Eddie Code cleaning.
eddieajau authored
66 return self::RELEASE . '.' . self::MAINTENANCE;
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
67 }
68
69 /**
70 * Gets a version string for the current Joomla Platform with all release information.
71 *
72 * @return string Complete version string.
4ece282 Andrew Eddie Change release to 11.2 (still under development).
eddieajau authored
73 *
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
74 * @since 11.1
75 */
76 public static function getLongVersion()
77 {
78e6bc0 Andrew Eddie Code cleaning.
eddieajau authored
78 return self::PRODUCT . ' ' . self::RELEASE . '.' . self::MAINTENANCE . ' ' . self::STATUS . ' [ ' . self::CODE_NAME . ' ] '
79 . self::RELEASE_DATE . ' ' . self::RELEASE_TIME . ' ' . self::RELEASE_TIME_ZONE;
cb8c4d8 Louis Landry Moving files around.
LouisLandry authored
80 }
81 }
Something went wrong with that request. Please try again.