Horde_Registry::getVersion PHP Method

getVersion() public method

Return the version string for a given application.
public getVersion ( string $app = null, boolean $number = false ) : string
$app string The application to get the value for.
$number boolean Return the raw version number, suitable for comparison purposes.
return string The version string for the application.
    public function getVersion($app = null, $number = false)
    {
        if (empty($app)) {
            $app = $this->getApp();
        }
        try {
            $api = $this->getApiInstance($app, 'application');
        } catch (Horde_Exception $e) {
            return 'unknown';
        }
        return $number ? preg_replace('/H\\d \\((.*)\\)/', '$1', $api->version) : $api->version;
    }