function load($file = null) { $type = $this->connection->getType(); $default_loader = 'lmbSQLDumpLoader'; $loader = 'lmb' . ucfirst($type) . 'DumpLoader'; if (file_exists(dirname(__FILE__) . '/dump/' . $loader . '.class.php')) { require_once dirname(__FILE__) . '/dump/' . $loader . '.class.php'; } else { $loader = $default_loader; } $file = $file ? $file : $this->file; $this->loader = new $loader($file); $this->loader->execute($this->connection); $this->connection->getDatabaseInfo()->loadTables(); }
/** * @param lmbDbConnection $connection */ static function isSupportedByDbConnection($connection) { $supported_types = array('mysql', 'mysqli'); return in_array($connection->getType(), $supported_types); }