Skip to content
This repository
Newer
Older
100644 81 lines (76 sloc) 2.24 kb
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
1 <?php
2 /**
608c1da6 » mbabker
2011-12-02 CodeSniff on base libraries files
3 * @package Joomla.Platform
0a72863a » LouisLandry
2011-03-20 Fixing file headers for both unit test and library files.
4 *
4329ba0c » chdemko
2012-01-03 Tagging 11.4
5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
608c1da6 » mbabker
2011-12-02 CodeSniff on base libraries files
6 * @license GNU General Public License version 2 or later; see LICENSE
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
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 */
6b60f72a » eddieajau
2011-06-02 Rename JVersion to JPlatform to avoid collion with CMS JVersion.
17 final class JPlatform
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
18 {
19 // Product name.
20 const PRODUCT = 'Joomla Platform';
21 // Release version.
4329ba0c » chdemko
2012-01-03 Tagging 11.4
22 const RELEASE = '11.4';
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
23 // Maintenance version.
24 const MAINTENANCE = '0';
25 // Development STATUS.
57d456a1 » LouisLandry
2011-07-26 In honor of my favorite new PLT member.
26 const STATUS = 'Stable';
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
27 // Build number.
28 const BUILD = 0;
29 // Code name.
4329ba0c » chdemko
2012-01-03 Tagging 11.4
30 const CODE_NAME = 'Brian Kernighan';
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
31 // Release date.
4329ba0c » chdemko
2012-01-03 Tagging 11.4
32 const RELEASE_DATE = '03-Jan-2012';
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
33 // Release time.
34 const RELEASE_TIME = '00:00';
35 // Release timezone.
36 const RELEASE_TIME_ZONE = 'GMT';
37 // Copyright Notice.
4329ba0c » chdemko
2012-01-03 Tagging 11.4
38 const COPYRIGHT = 'Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.';
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
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 *
4ece282e » eddieajau
2011-07-09 Change release to 11.2 (still under development).
45 * @param string $minimum The minimum version of the Joomla Platform which is compatible.
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
46 *
fe90bf3d » elinw
2011-06-21 applied patch
47 * @return boolean True if the version is compatible.
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
48 *
49 * @see http://www.php.net/version_compare
50 * @since 11.1
51 */
52 public static function isCompatible($minimum)
53 {
79a80b9c » eddieajau
2011-07-09 Fix JPlatform test failures.
54 return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
55 }
56
57 /**
58 * Gets a "PHP standardized" version string for the current Joomla Platform.
59 *
60 * @return string Version string.
4ece282e » eddieajau
2011-07-09 Change release to 11.2 (still under development).
61 *
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
62 * @since 11.1
63 */
64 public static function getShortVersion()
65 {
78e6bc0c » eddieajau
2011-07-29 Code cleaning.
66 return self::RELEASE . '.' . self::MAINTENANCE;
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
67 }
68
69 /**
70 * Gets a version string for the current Joomla Platform with all release information.
71 *
72 * @return string Complete version string.
4ece282e » eddieajau
2011-07-09 Change release to 11.2 (still under development).
73 *
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
74 * @since 11.1
75 */
76 public static function getLongVersion()
77 {
78e6bc0c » eddieajau
2011-07-29 Code cleaning.
78 return self::PRODUCT . ' ' . self::RELEASE . '.' . self::MAINTENANCE . ' ' . self::STATUS . ' [ ' . self::CODE_NAME . ' ] '
79 . self::RELEASE_DATE . ' ' . self::RELEASE_TIME . ' ' . self::RELEASE_TIME_ZONE;
cb8c4d88 » LouisLandry
2011-02-08 Moving files around.
80 }
81 }
Something went wrong with that request. Please try again.