You are here

class Cleaner in Cleaner 8

Class Cleaner.

@package Drupal\cleaner

Hierarchy

Expanded class hierarchy of Cleaner

3 string references to 'Cleaner'
cleaner.info.yml in ./cleaner.info.yml
cleaner.info.yml
cleaner.links.menu.yml in ./cleaner.links.menu.yml
cleaner.links.menu.yml
cleaner.services.yml in ./cleaner.services.yml
cleaner.services.yml
1 service uses Cleaner
cleaner in ./cleaner.services.yml
Drupal\cleaner\Cleaner

File

src/Cleaner.php, line 10

Namespace

Drupal\cleaner
View source
class Cleaner {

  /**
   * Available services array.
   *
   * @var array
   */
  protected static $services = [
    'cleaner_tables',
    'cleaner_mysql',
    'cleaner_session',
    'cleaner_watchdog',
  ];

  /**
   * Run Cleaner service.
   */
  public static function run() {
    $services = (array) self::$services;
    if (!empty($services)) {
      foreach ($services as $service) {
        if (\Drupal::hasService($service)) {
          \Drupal::service($service)
            ->execute();
        }
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Cleaner::$services protected static property Available services array.
Cleaner::run public static function Run Cleaner service.