Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 83 lines (77 sloc) 2.209 kb
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
1 <?php
2 /**
0a72863 @LouisLandry 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 @LouisLandry 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 @eddieajau Rename JVersion to JPlatform to avoid collion with CMS JVersion.
eddieajau authored
17 final class JPlatform
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
18 {
19 // Product name.
20 const PRODUCT = 'Joomla Platform';
21 // Release version.
4ece282 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
22 const RELEASE = '11.2';
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
23 // Maintenance version.
24 const MAINTENANCE = '0';
25 // Development STATUS.
57d456a @LouisLandry In honor of my favorite new PLT member.
LouisLandry authored
26 const STATUS = 'Stable';
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
27 // Build number.
28 const BUILD = 0;
29 // Code name.
57d456a @LouisLandry In honor of my favorite new PLT member.
LouisLandry authored
30 const CODE_NAME = 'Omar';
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
31 // Release date.
57d456a @LouisLandry In honor of my favorite new PLT member.
LouisLandry authored
32 const RELEASE_DATE = '27-Jul-2011';
cb8c4d8 @LouisLandry 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 @eddieajau 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 @LouisLandry Moving files around.
LouisLandry authored
46 *
fe90bf3 @elinw applied patch
elinw authored
47 * @return boolean True if the version is compatible.
cb8c4d8 @LouisLandry 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 @eddieajau Fix JPlatform test failures.
eddieajau authored
54 return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
cb8c4d8 @LouisLandry 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 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
61 *
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
62 * @since 11.1
63 */
64 public static function getShortVersion()
65 {
6b60f72 @eddieajau Rename JVersion to JPlatform to avoid collion with CMS JVersion.
eddieajau authored
66 return self::RELEASE.'.'.self::MAINTENANCE;
cb8c4d8 @LouisLandry 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 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
73 *
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
74 * @since 11.1
75 */
76 public static function getLongVersion()
77 {
6b60f72 @eddieajau Rename JVersion to JPlatform to avoid collion with CMS JVersion.
eddieajau authored
78 return self::PRODUCT.' '. self::RELEASE.'.'.self::MAINTENANCE.' '
79 . self::STATUS.' [ '.self::CODE_NAME.' ] '.self::RELEASE_DATE.' '
80 .self::RELEASE_TIME.' '.self::RELEASE_TIME_ZONE;
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
81 }
82 }
Something went wrong with that request. Please try again.