protected Schema::getPrefixInfo($table = 'default', $add_prefix = TRUE)
Get information about the table and database name from the prefix.
A keyed array with information about the database, table name and prefix.
Overrides Schema::getPrefixInfo
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 { $info['database'] = $this->connection->getConnectionOptions()['database']; $info['table'] = $table; } return $info; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!mysql!Schema.php/function/Schema::getPrefixInfo/8.1.x