public function Debugger::extractClassName in Acquia Purge 8
Generate a short and readable class name.
Parameters
string|object $caller: Fully namespaced class string or instantiated object.
Return value
string String describing the class name to the user.
Overrides DebuggerInterface::extractClassName
3 calls to Debugger::extractClassName()
- Debugger::callerAdd in src/
Plugin/ Purge/ Purger/ Debugger.php - Register the current caller to the callgraph.
- Debugger::callerRemove in src/
Plugin/ Purge/ Purger/ Debugger.php - Remove the current caller from the callgraph.
- Debugger::logFailedRequest in src/
Plugin/ Purge/ Purger/ Debugger.php - Log the given failure with as much info as possible.
File
- src/
Plugin/ Purge/ Purger/ Debugger.php, line 92
Class
- Debugger
- Provides a centralized debugger for Acquia purger plugins.
Namespace
Drupal\acquia_purge\Plugin\Purge\PurgerCode
public function extractClassName($caller) {
if (is_object($caller)) {
$caller = get_class($caller);
}
// Strip out a couple of common class paths to make output more readable.
$caller = str_replace('Drupal\\acquia_purge\\', '', $caller);
$caller = str_replace('Plugin\\Purge\\Purger\\', '', $caller);
return $caller;
}