trait DebuggerAwareTrait in Acquia Purge 8
Provides a Acquia purger which is debugging aware.
Hierarchy
- trait \Drupal\acquia_purge\Plugin\Purge\Purger\DebuggerAwareTrait uses PurgeLoggerAwareTrait
2 files declare their use of DebuggerAwareTrait
- BackendBase.php in src/
AcquiaPlatformCdn/ BackendBase.php - DebuggerMiddleware.php in src/
Http/ DebuggerMiddleware.php
File
- src/
Plugin/ Purge/ Purger/ DebuggerAwareTrait.php, line 10
Namespace
Drupal\acquia_purge\Plugin\Purge\PurgerView source
trait DebuggerAwareTrait {
use PurgeLoggerAwareTrait;
/**
* The debugger instance.
*
* @var null|\Drupal\acquia_purge\Plugin\Purge\Purger\DebuggerInterface
*/
private $debuggerInstance = NULL;
/**
* {@inheritdoc}
*/
public function debugger() {
if (is_null($this->debuggerInstance)) {
$this->debuggerInstance = new Debugger($this
->logger());
}
return $this->debuggerInstance;
}
/**
* {@inheritdoc}
*/
public function setDebugger(DebuggerInterface $debugger, $throw = TRUE) {
if ($throw && !is_null($this->debuggerInstance)) {
throw new \RuntimeException("Debugger already instantiated!");
}
$this->debuggerInstance = $debugger;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DebuggerAwareTrait:: |
private | property | The debugger instance. | |
DebuggerAwareTrait:: |
public | function | ||
DebuggerAwareTrait:: |
public | function | ||
PurgeLoggerAwareTrait:: |
protected | property | Channel logger. | |
PurgeLoggerAwareTrait:: |
public | function |