Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 92 lines (76 sloc) 2.25 kb
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
1 <?php
2 /**
608c1da @mbabker CodeSniff on base libraries files
mbabker authored
3 * @package Joomla.Platform
0a72863 @LouisLandry Fixing file headers for both unit test and library files.
LouisLandry authored
4 *
4329ba0 @chdemko Tagging 11.4
chdemko authored
5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
608c1da @mbabker CodeSniff on base libraries files
mbabker authored
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';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
21
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
22 // Release version.
4329ba0 @chdemko Tagging 11.4
chdemko authored
23 const RELEASE = '11.4';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
24
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
25 // Maintenance version.
26 const MAINTENANCE = '0';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
27
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
28 // Development STATUS.
57d456a @LouisLandry In honor of my favorite new PLT member.
LouisLandry authored
29 const STATUS = 'Stable';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
30
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
31 // Build number.
32 const BUILD = 0;
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
33
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
34 // Code name.
4329ba0 @chdemko Tagging 11.4
chdemko authored
35 const CODE_NAME = 'Brian Kernighan';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
36
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
37 // Release date.
4329ba0 @chdemko Tagging 11.4
chdemko authored
38 const RELEASE_DATE = '03-Jan-2012';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
39
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
40 // Release time.
41 const RELEASE_TIME = '00:00';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
42
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
43 // Release timezone.
44 const RELEASE_TIME_ZONE = 'GMT';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
45
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
46 // Copyright Notice.
4329ba0 @chdemko Tagging 11.4
chdemko authored
47 const COPYRIGHT = 'Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.';
9e9d4d9 @elkuku Code style: Single comments fix
elkuku authored
48
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
49 // Link text.
50 const LINK_TEXT = '<a href="http://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 *
4ece282 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
55 * @param string $minimum The minimum version of the Joomla Platform which is compatible.
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
56 *
fe90bf3 @elinw applied patch
elinw authored
57 * @return boolean True if the version is compatible.
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
58 *
59 * @see http://www.php.net/version_compare
60 * @since 11.1
61 */
62 public static function isCompatible($minimum)
63 {
79a80b9 @eddieajau Fix JPlatform test failures.
eddieajau authored
64 return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
65 }
66
67 /**
68 * Gets a "PHP standardized" version string for the current Joomla Platform.
69 *
70 * @return string Version string.
4ece282 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
71 *
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
72 * @since 11.1
73 */
74 public static function getShortVersion()
75 {
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
76 return self::RELEASE . '.' . self::MAINTENANCE;
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
77 }
78
79 /**
80 * Gets a version string for the current Joomla Platform with all release information.
81 *
82 * @return string Complete version string.
4ece282 @eddieajau Change release to 11.2 (still under development).
eddieajau authored
83 *
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
84 * @since 11.1
85 */
86 public static function getLongVersion()
87 {
78e6bc0 @eddieajau Code cleaning.
eddieajau authored
88 return self::PRODUCT . ' ' . self::RELEASE . '.' . self::MAINTENANCE . ' ' . self::STATUS . ' [ ' . self::CODE_NAME . ' ] '
89 . self::RELEASE_DATE . ' ' . self::RELEASE_TIME . ' ' . self::RELEASE_TIME_ZONE;
cb8c4d8 @LouisLandry Moving files around.
LouisLandry authored
90 }
91 }
Something went wrong with that request. Please try again.