class Version

Version information class for the Joomla CMS.

Constants

PRODUCT

Product name.

MAJOR_VERSION

Major release version.

MINOR_VERSION

Minor release version.

PATCH_VERSION

Patch release version.

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.

RELEASE

Release version.

DEV_LEVEL

Maintenance version.

DEV_STATUS

Development status.

BUILD

Build number.

CODENAME

Code name.

RELDATE

Release date.

RELTIME

Release time.

RELTZ

Release timezone.

Copyright Notice.

URL

Link text.

Methods

mixed
__get( string $name)

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

boolean
isInDevelopmentState()

Check if we are in development mode

boolean
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 $component = null, bool $mask = false, bool $add_version = 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

mixed __get( string $name)

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

Parameters

string $name The name of the property.

Return Value

mixed A value if the property name is valid.

boolean isInDevelopmentState()

Check if we are in development mode

Return Value

boolean

boolean isCompatible( string $minimum)

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

boolean True if the version is compatible.

string getHelpVersion()

Method to get the help file version.

Return Value

string Version suffix for help files.

string getShortVersion()

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

Return Value

string Version string.

string getLongVersion()

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

Return Value

string Complete version string.

string getUserAgent( string $component = null, bool $mask = false, bool $add_version = true)

Returns the user agent.

Parameters

string $component Name of the component.
bool $mask Mask as Mozilla/5.0 or not.
bool $add_version Add version afterwards to component.

Return Value

string User Agent.

string generateMediaVersion()

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

Return Value

string

string getMediaVersion()

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()

Function to refresh the media version

Return Value

Version Instance of $this to allow chaining.

Version setMediaVersion( string $mediaVersion)

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.