public function getCurrentComponentVersion($name)
    {
        try {
            $currentVersion = Option::get(self::getNameInOptionTable($name));
        } catch (\Exception $e) {
            // mysql error 1146: table doesn't exist
            if (Db::get()->isErrNo($e, '1146')) {
                // case when the option table is not yet created (before 0.2.10)
                $currentVersion = false;
            } else {
                // failed for some other reason
                throw $e;
            }
        }

        return $currentVersion;
    }
public function getCurrentComponentVersion($name)
    {
        try {
            $currentVersion = Option::get(self::getNameInOptionTable($name));
        } catch (\Exception $e) {
            // mysql error 1146: table doesn't exist
            if (Db::get()->isErrNo($e, '1146')) {
                // case when the option table is not yet created (before 0.2.10)
                $currentVersion = false;
            } else {
                // failed for some other reason
                throw $e;
            }
        }

        return $currentVersion;
    }
public function getCurrentComponentVersion ( $ name ) { try { $ currentVersion = Option :: get ( self :: getNameInOptionTable ( $ name ) ) ; } catch ( \ Exception $ e ) { // mysql error 1146: table doesn't exist if ( Db :: get ( ) -> isErrNo ( $ e , '1146' ) ) { // case when the option table is not yet created (before 0.2.10) $ currentVersion = false ; } else { // failed for some other reason throw $ e ; } } return $ currentVersion ; }
Returns the currently installed version of a Piwik component.

@param string $name The component name. Eg, a plugin name, `'core'` or dimension column name.
@return string A semantic version.
@throws \Exception
Returns the currently installed version of a Piwik component .