Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
platform.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  *
5  * @copyright Copyright (C) 2005 - 2013 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  * @package Joomla.Platform
15  * @since 11.1
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 - 2013 Open Source Matters, Inc. All rights reserved.';
48 
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  *
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  * @see http://www.php.net/version_compare
60  * @since 11.1
61  */
62  public static function isCompatible($minimum)
63  {
64  return (version_compare(self::getShortVersion(), $minimum, 'eq') == 1);
65  }
66 
67  /**
68  * Gets a "PHP standardized" version string for the current Joomla Platform.
69  *
70  * @return string Version string.
71  *
72  * @since 11.1
73  */
74  public static function getShortVersion()
75  {
76  return self::RELEASE . '.' . self::MAINTENANCE;
77  }
78 
79  /**
80  * Gets a version string for the current Joomla Platform with all release information.
81  *
82  * @return string Complete version string.
83  *
84  * @since 11.1
85  */
86  public static function getLongVersion()
87  {
88  return self::PRODUCT . ' ' . self::RELEASE . '.' . self::MAINTENANCE . ' ' . self::STATUS . ' [ ' . self::CODE_NAME . ' ] '
89  . self::RELEASE_DATE . ' ' . self::RELEASE_TIME . ' ' . self::RELEASE_TIME_ZONE;
90  }
91 }