class PrefixHandler in DB Maintenance 8
Same name and namespace in other branches
- 7.2 src/Module/Db/PrefixHandler.php \Drupal\db_maintenance\Module\Db\PrefixHandler
- 2.0.x src/Module/Db/PrefixHandler.php \Drupal\db_maintenance\Module\Db\PrefixHandler
PrefixHandler class.
Hierarchy
- class \Drupal\db_maintenance\Module\Db\PrefixHandler
Expanded class hierarchy of PrefixHandler
File
- src/
Module/ Db/ PrefixHandler.php, line 17 - PrefixHandler class.
Namespace
Drupal\db_maintenance\Module\DbView source
class PrefixHandler {
/**
* Returns table prefix.
*/
public static function getPrefix($table) {
$px = Database::getConnection()
->tablePrefix($table);
return $px;
}
/**
* Cleans table prefix.
*/
public static function clearPrefix($table) {
$px = self::getPrefix($table);
if (strlen($px) > 0) {
$table_clear = str_replace($px, '', $table);
return $table_clear;
}
return $table;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrefixHandler:: |
public static | function | Cleans table prefix. | |
PrefixHandler:: |
public static | function | Returns table prefix. |