You are here

private static function Cleaner::cleanerClearTables in Cleaner 7

Clear tables handler.

Parameters

array $tables: Table names array.

Return value

array A list of successfully cleared tables.

2 calls to Cleaner::cleanerClearTables()
Cleaner::cleanerAdditionalTablesClear in ./class.Cleaner.php
Clear additional tables.
Cleaner::cleanerCacheClear in ./class.Cleaner.php
Cache tables clearing handler.

File

./class.Cleaner.php, line 128
Cleaner base class file.

Class

Cleaner
Class Cleaner.

Code

private static function cleanerClearTables($tables) {
  $list = array();
  foreach ($tables as $table) {
    if (!db_table_exists($table)) {
      continue;
    }
    if (db_query("TRUNCATE {$table}")
      ->execute()) {
      $list[] = $table;
    }
  }
  return $list;
}