You are here

private function CleanerCacheController::getDatabaseName in Cleaner 8

Get the current database name.

Return value

null|string Current database name.

1 call to CleanerCacheController::getDatabaseName()
CleanerCacheController::cleanerGetCacheTables in src/Controller/CleanerCacheController.php
Helper function for gathering all names of cache tables in DB.

File

src/Controller/CleanerCacheController.php, line 196

Class

CleanerCacheController
Class CleanerCacheController.

Namespace

Drupal\cleaner\Controller

Code

private function getDatabaseName() {
  $options = $this->connection
    ->getConnectionOptions();
  return isset($options['database']) ? $options['database'] : NULL;
}