Version

Version information class for the Joomla CMS.

final
since

1.0

Methods

__get

Magic getter providing access to constants previously defined as class member vars.

__get(string $name) : mixed
deprecated
since

3.5

deprecated

4.0 Access the constants directly

Arguments

$name

stringThe name of the property.

Response

mixedA value if the property name is valid.

generateMediaVersion

Generate a media version string for assets Public to allow third party developers to use it

generateMediaVersion() : string
since

3.2

Response

string

getHelpVersion

Method to get the help file version.

getHelpVersion() : string
since

1.0

Response

stringVersion suffix for help files.

getLongVersion

Gets a version string for the current Joomla with all release information.

getLongVersion() : string
since

1.5

Response

stringComplete version string.

getMediaVersion

Gets a media version which is used to append to Joomla core media files.

getMediaVersion() : string

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.

since

3.2

Response

stringThe media version.

getShortVersion

Gets a "PHP standardized" version string for the current Joomla.

getShortVersion() : string
since

1.5

Response

stringVersion string.

getUserAgent

Returns the user agent.

getUserAgent(string $component = null, boolean $mask = false, boolean $add_version = true) : string
since

1.0

Arguments

$component

stringName of the component.

$mask

booleanMask as Mozilla/5.0 or not.

$add_version

booleanAdd version afterwards to component.

Response

stringUser Agent.

isCompatible

Compares two a "PHP standardized" version number against the current Joomla version.

isCompatible(string $minimum) : boolean
link

https://www.php.net/version_compare

since

1.0

Arguments

$minimum

stringThe minimum version of the Joomla which is compatible.

Response

booleanTrue if the version is compatible.

isInDevelopmentState

Check if we are in development mode

isInDevelopmentState() : boolean
since

3.4.3

Response

boolean

refreshMediaVersion

Function to refresh the media version

refreshMediaVersion() : \Joomla\CMS\Version
since

3.2

Response

\Joomla\CMS\VersionInstance of $this to allow chaining.

setMediaVersion

Sets the media version which is used to append to Joomla core media files.

setMediaVersion(string $mediaVersion) : \Joomla\CMS\Version
since

3.2

Arguments

$mediaVersion

stringThe media version.

Response

\Joomla\CMS\VersionInstance of $this to allow chaining.

Constants

PRODUCT

Product name.

Value 'Joomla!'
since

3.5

Type(s)

string

MAJOR_VERSION

Major release version.

Value 3
since

3.8.0

Type(s)

integer

MINOR_VERSION

Minor release version.

Value 9
since

3.8.0

Type(s)

integer

PATCH_VERSION

Patch release version.

Value 10
since

3.8.0

Type(s)

integer

EXTRA_VERSION

Extra release version info.

This constant when not empty adds an additional identifier to the version string to reflect the development state. For example, for 3.8.0 when this is set to 'dev' the version string will be 3.8.0-dev.

Value ''
since

3.8.0

Type(s)

string

RELEASE

Release version.

deprecated
Value '3.9'
since

3.5

deprecated

4.0 Use separated version constants instead

Type(s)

string

DEV_LEVEL

Maintenance version.

deprecated
Value '10'
since

3.5

deprecated

4.0 Use separated version constants instead

Type(s)

string

DEV_STATUS

Development status.

Value 'Stable'
since

3.5

Type(s)

string

BUILD

Build number.

deprecated
Value ''
since

3.5

deprecated

4.0

Type(s)

string

CODENAME

Code name.

Value 'Amani'
since

3.5

Type(s)

string

RELDATE

Release date.

Value '10-July-2019'
since

3.5

Type(s)

string

RELTIME

Release time.

Value '15:57'
since

3.5

Type(s)

string

RELTZ

Release timezone.

Value 'GMT'
since

3.5

Type(s)

string

URL

Link text.

Value '<a href="https://www.joomla.org">Joomla!</a> is Free Software released under the GNU General Public License.'
since

3.5

Type(s)

string