* @package MCMS\System\Plugin */ abstract class PlugInBase extends \Mammut\StrictObject implements iPlugIn { /** * Fetches the installed version from the database. * * @return string the version string or NULL if not installed */ protected static function getInstalledVersion() { $db = \MCMS\System::getInstance ()->getDB (); $sql = $db->select()->columns(['version'])->from('installinfos')->where(['type' => 'plugin', 'key' => new Parameter()]); $obj = $db->getObjectP($sql,[self::clazz()]); return empty($obj) ? NULL : $obj->version; } }