You are here

class VarDumperWatchdog in VarDumper 7

Same name and namespace in other branches
  1. 8 modules/vardumper_watchdog/src/VarDumper/VarDumperWatchdog.php \Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog

The VarDumperWatchdog class.

Hierarchy

Expanded class hierarchy of VarDumperWatchdog

1 string reference to 'VarDumperWatchdog'
vardumper_watchdog.services.yml in modules/vardumper_watchdog/vardumper_watchdog.services.yml
modules/vardumper_watchdog/vardumper_watchdog.services.yml
1 service uses VarDumperWatchdog
vardumper_watchdog in modules/vardumper_watchdog/vardumper_watchdog.services.yml
\Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog

File

modules/vardumper_watchdog/src/VarDumper/VarDumperWatchdog.php, line 15
Contains Drupal\vardumper_watchdog\VarDumper\VarDumperWatchdog.

Namespace

Drupal\vardumper_watchdog\VarDumper
View source
class VarDumperWatchdog extends VarDumperDebug {

  /**
   * The Logger service.
   *
   * @var \Psr\Log\LoggerInterface
   */
  protected $logger;

  /**
   * {@inheritdoc}
   */
  public function __construct(LoggerInterface $logger) {
    $this->logger = $logger;
  }

  /**
   * {@inheritdoc}
   */
  public function dump($var, $name = '') {

    // Permission are not checked in this submodule because permissions
    // are set on the module dblog from Drupal 7.
    $this->logger
      ->debug($this
      ->getHeaders($name, $this
      ->getDebugInformation()) . $this
      ->getDebug($var));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
VarDumperDebug::$header1 protected property
VarDumperDebug::$header2 protected property
VarDumperDebug::getDebug public function
VarDumperDebug::getDebugInformation public function
VarDumperDebug::getHeaders public function
VarDumperDebug::hasPermission public function
VarDumperWatchdog::$logger protected property The Logger service.
VarDumperWatchdog::dump public function
VarDumperWatchdog::__construct public function