Since: 1.0

final class Version

Version information class for the Joomla CMS.

Constants

PRODUCT Since: 3.5

Product name.

MAJOR_VERSION Since: 3.8.0

Major release version.

MINOR_VERSION Since: 3.8.0

Minor release version.

PATCH_VERSION Since: 3.8.0

Patch release version.

EXTRA_VERSION Since: 3.8.0

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.

DEV_STATUS Since: 3.5

Development status.

CODENAME Since: 3.5

Code name.

RELDATE Since: 3.5

Release date.

RELTIME Since: 3.5

Release time.

RELTZ Since: 3.5

Release timezone.

Copyright Notice.

URL Since: 3.5

Link text.

Methods

bool
isInDevelopmentState()

Check if we are in development mode

bool
isCompatible(string $minimum)

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

string
getHelpVersion()

Method to get the help file version.

string
getShortVersion()

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

string
getLongVersion()

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

string
getUserAgent(string $suffix = '', bool $mask = false, bool $addVersion = true)

Returns the user agent.

string
generateMediaVersion()

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

string
getMediaVersion()

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

refreshMediaVersion()

Function to refresh the media version

setMediaVersion(string $mediaVersion)

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

Details

bool isInDevelopmentState()

Since: 3.4.3

Check if we are in development mode

Return Value

bool

bool isCompatible(string $minimum)

Since: 1.0

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

Parameters

string $minimum

The minimum version of the Joomla which is compatible.

Return Value

bool

True if the version is compatible.

string getHelpVersion()

Since: 1.0

Method to get the help file version.

Return Value

string

Version suffix for help files.

string getShortVersion()

Since: 1.5

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

Return Value

string

Version string.

string getLongVersion()

Since: 1.5

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

Return Value

string

Complete version string.

string getUserAgent(string $suffix = '', bool $mask = false, bool $addVersion = true)

Since: 1.0

Returns the user agent.

Parameters

string $suffix

String to append to resulting user agent.

bool $mask

Mask as Mozilla/5.0 or not.

bool $addVersion

Add version afterwards to component.

Return Value

string

User Agent.

string generateMediaVersion()

Since: 3.2

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

Return Value

string

string getMediaVersion()

Since: 3.2

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 Value

string

The media version.

Version refreshMediaVersion()

Since: 3.2

Function to refresh the media version

Return Value

Version

Instance of $this to allow chaining.

Version setMediaVersion(string $mediaVersion)

Since: 3.2

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

Parameters

string $mediaVersion

The media version.

Return Value

Version

Instance of $this to allow chaining.