Joomla! 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 * @since 1.0 */ public function isCompatible($minimum) { return version_compare(JVERSION, $minimum, 'ge'); } /** * Method to get the help file version. * * @return string Version suffix for help files. * * @since 1.0 */ public function getHelpVersion() { return '.' . str_replace('.', '', $this->RELEASE); } /** * Gets a "PHP standardized" version string for the current Joomla. * * @return string Version string. * * @since 1.5 */ public function getShortVersion() { return $this->RELEASE . '.' . $this->DEV_LEVEL; } /** * Gets a version string for the current Joomla with all release information. * * @return string Complete version string. * * @since 1.5 */ public function getLongVersion() { return $this->PRODUCT . ' ' . $this->RELEASE . '.' . $this->DEV_LEVEL . ' ' . $this->DEV_STATUS . ' [ ' . $this->CODENAME . ' ] ' . $this->RELDATE . ' ' . $this->RELTIME . ' ' . $this->RELTZ; } /** * 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. * * @since 1.0 */ public function getUserAgent($component = null, $mask = false, $add_version = true) { if ($component === null) { $component = 'Framework'; } if ($add_version) { $component .= '/' . $this->RELEASE; } // If masked pretend to look like Mozilla 5.0 but still identify ourselves. if ($mask) { return 'Mozilla/5.0 ' . $this->PRODUCT . '/' . $this->RELEASE . '.' . $this->DEV_LEVEL . ($component ? ' ' . $component : ''); } else { return $this->PRODUCT . '/' . $this->RELEASE . '.' . $this->DEV_LEVEL . ($component ? ' ' . $component : ''); } } }