You are here

public function Connection::escapeDatabase in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::escapeDatabase()

File

lib/Drupal/Core/Database/Connection.php, line 115
Contains \Drupal\Core\Database\Connection.

Class

Connection

Namespace

Drupal\Core\Database

Code

public function escapeDatabase($database) {
  return preg_replace('/[^A-Za-z0-9_.]+/', '', $database);
}