You are here

protected function CleanerCacheClearEventSubscriber::getDatabaseName in Cleaner 8.2

Get active database name.

Return value

string|null Database name.

1 call to CleanerCacheClearEventSubscriber::getDatabaseName()
CleanerCacheClearEventSubscriber::cleanerGetCacheTables in src/EventSubscriber/CleanerCacheClearEventSubscriber.php
Get cache tables list.

File

src/EventSubscriber/CleanerCacheClearEventSubscriber.php, line 159

Class

CleanerCacheClearEventSubscriber
Class CleanerCacheClearEventSubscriber.

Namespace

Drupal\cleaner\EventSubscriber

Code

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