/** * Gets information about sensor by sensor ID code * * @access protected * @param string $sensor_id_code * @return array */ protected function getSensorInfo($sensor_id_code) { if (!array_key_exists($sensor_id_code, $this->_sensors)) { $sensor = StationSensor::getInfoForHandler($sensor_id_code, $this->_station->station_id); if (is_null($sensor)) { $this->pushWarning('unknown_sensor', 'Can not find sensor "' . $sensor_id_code . '" for station "' . $this->_station->station_id_code . '" in the database. Sensor value was not saved.'); return false; } else { $this->_sensors[$sensor_id_code]['sensor'] = $sensor; $this->_sensors[$sensor_id_code]['features'] = StationSensorFeature::getInfoForHandler($sensor->station_sensor_id); } } return $this->_sensors[$sensor_id_code]; }