You are here

public function SensorRunner::__construct in Monitoring 8

Same name and namespace in other branches
  1. 7 lib/Drupal/monitoring/SensorRunner.php \Drupal\monitoring\SensorRunner::__construct()

Constructs a SensorRunner.

Parameters

\Drupal\monitoring\Sensor\SensorManager $sensor_manager:

\Drupal\Core\Cache\CacheBackendInterface $cache:

\Drupal\Core\Config\ConfigFactoryInterface $config_factory:

File

src/SensorRunner.php, line 78
Contains \Drupal\monitoring\SensorRunner.

Class

SensorRunner
Instantiate and run requested sensors.

Namespace

Drupal\monitoring

Code

public function __construct(SensorManager $sensor_manager, CacheBackendInterface $cache, ConfigFactoryInterface $config_factory) {
  $this->sensorManager = $sensor_manager;
  $this->config = $config_factory
    ->get('monitoring.settings');
  $this->cache = $cache;
}