protected function SchemaDatabaseSchema_mysql::getPrefixInfo in Schema 8
Overrides DatabaseSchema_mysql::getPrefixInfo().
@todo Remove when https://drupal.org/node/2223073 is fixed in core.
Overrides Schema::getPrefixInfo
1 call to SchemaDatabaseSchema_mysql::getPrefixInfo()
File
- src/
SchemaDatabaseSchema_mysql.php, line 78 - Schema module enhancements to DatabaseSchema_mysql
Class
Namespace
Drupal\schemaCode
protected function getPrefixInfo($table = 'default', $add_prefix = TRUE) {
$info = array(
'prefix' => $this->connection
->tablePrefix($table),
);
if ($add_prefix) {
$table = $info['prefix'] . $table;
}
if (($pos = strpos($table, '.')) !== FALSE) {
$info['database'] = substr($table, 0, $pos);
$info['table'] = substr($table, ++$pos);
}
else {
$db_info = $this->connection
->getConnectionOptions();
$info['database'] = $db_info['database'];
$info['table'] = $table;
}
return $info;
}