You are here

function SensorInfo::__construct in Monitoring 7

Instantiates sensor info object.

Note that sensor_info is unchecked and needs to be well defined.

Parameters

string $sensor_name: Sensor name.

array $sensor_info: Sensor info.

See also

hook_monitoring_sensor_info().

File

lib/Drupal/monitoring/Sensor/SensorInfo.php, line 42
Contains \Drupal\monitoring\Sensor\SensorInfo.

Class

SensorInfo
Represents a sensor info as defined in hook_monitoring_sensor_info().

Namespace

Drupal\monitoring\Sensor

Code

function __construct($sensor_name, array $sensor_info) {
  $this->sensorName = $sensor_name;
  $this->sensorInfo = $sensor_info;
}