Esempio n. 1
0
 /**
  * Get an instance of a helper class for the specific database.
  * @param string $databaseClass e.g. MySQLDatabase or MSSQLDatabase
  */
 public function getDatabaseConfigurationHelper($databaseClass)
 {
     $adapters = DatabaseAdapterRegistry::get_adapters();
     if (isset($adapters[$databaseClass])) {
         $helperPath = $adapters[$databaseClass]['helperPath'];
         $class = str_replace('.php', '', basename($helperPath));
     }
     return class_exists($class) ? new $class() : false;
 }