Source for file version.php
Documentation is available at version.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Version information class for the Joomla CMS.
* @package Joomla.Libraries
/** @var string Product name. */
/** @var string Release version. */
/** @var string Maintenance version. */
/** @var string Development STATUS. */
/** @var string Build number. */
/** @var string Code name. */
/** @var string Release date. */
/** @var string Release time. */
/** @var string Release timezone. */
/** @var string Copyright Notice. */
public $COPYRIGHT =
'Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.';
/** @var string Link text. */
public $URL =
'<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the GNU General Public License.';
* Compares two a "PHP standardized" version number against the current Joomla version.
* @param string $minimum The minimum version of the Joomla which is compatible.
* @return bool True if the version is compatible.
* @see http://www.php.net/version_compare
* Method to get the help file version.
* @return string Version suffix for help files.
* Gets a "PHP standardized" version string for the current Joomla.
* @return string Version string.
* Gets a version string for the current Joomla with all release information.
* @return string Complete version string.
* Returns the user agent.
* @param string $component Name of the component.
* @param bool $mask Mask as Mozilla/5.0 or not.
* @param bool $add_version Add version afterwards to component.
* @return string User Agent.
public function getUserAgent($component =
null, $mask =
false, $add_version =
true)
$component =
'Framework';
$component .=
'/' .
$this->RELEASE;
// If masked pretend to look like Mozilla 5.0 but still identify ourselves.
return 'Mozilla/5.0 ' .
$this->PRODUCT .
'/' .
$this->RELEASE .
'.' .
$this->DEV_LEVEL .
($component ?
' ' .
$component :
'');
* Generate a media version string for assets
* Public to allow third party developers to use it
* Gets a media version which is used to append to Joomla core media files.
* This media version is used to append to Joomla core media in order to trick browsers into
* reloading the CSS and JavaScript, because they think the files are renewed.
* The media version is renewed after Joomla core update, install, discover_install and uninstallation.
* @return string The media version.
// Load the media version and cache it for future use
static $mediaVersion =
null;
if ($mediaVersion ===
null)
$config =
JFactory::getConfig();
$debugEnabled =
$config->get('debug', 0);
// Get the joomla library params
$mediaVersion =
$params->get('mediaversion', '');
// Refresh assets in debug mode or when the media version is not set
if ($debugEnabled ||
empty($mediaVersion))
* Function to refresh the media version
* @return JVersion Instance of $this to allow chaining.
* Sets the media version which is used to append to Joomla core media files.
* @param string $mediaVersion The media version.
* @return JVersion Instance of $this to allow chaining.
// Do not allow empty media versions
if (!empty($mediaVersion))
// Get library parameters
$params->set('mediaversion', $mediaVersion);
Documentation generated on Tue, 19 Nov 2013 15:16:45 +0100 by phpDocumentor 1.4.3