public static function getModel($type) { if (self::$model) { return self::$model; } if ($type == 'pdopostgres') { include dirname(__FILE__) . DS . 'install_postgres.php'; self::$model = new SomeModelInstall_Postgres(); } else { if ($type == 'pdomysql') { include dirname(__FILE__) . DS . 'install_mysql.php'; self::$model = new SomeModelInstall_Mysql(); } } self::$model->loadConfiguration(); return self::$model; }
public function getSomesessionStatus() { if (!$this->getConnected()) { return false; } $dbdriver = $this->conf_categories['database']['databasedriver']; $installmodel = SomeModelInstall::getModel($dbdriver); return $installmodel->isSomesessionInstalled(); }