You are here

public function SensorDatabaseAggregator::fetchObject in Monitoring 7

Get fetched object from the executed query.

Multiple calls to executedQuery->fetchObjects() resulted in second call returning false value.

Return value

object

3 calls to SensorDatabaseAggregator::fetchObject()
SensorDatabaseAggregator::runSensor in lib/Drupal/monitoring/Sensor/Sensors/SensorDatabaseAggregator.php
Runs the sensor, updating $sensor_result.
SensorDblog404::runSensor in lib/Drupal/monitoring/Sensor/Sensors/SensorDblog404.php
Runs the sensor, updating $sensor_result.
SensorImageMissingStyle::runSensor in lib/Drupal/monitoring/Sensor/Sensors/SensorImageMissingStyle.php
Runs the sensor, updating $sensor_result.

File

lib/Drupal/monitoring/Sensor/Sensors/SensorDatabaseAggregator.php, line 116
Contains \Drupal\monitoring\Sensor\Sensors\SensorDatabaseAggregator.

Class

SensorDatabaseAggregator
Base for database aggregator sensors.

Namespace

Drupal\monitoring\Sensor\Sensors

Code

public function fetchObject() {
  if ($this->fetchedObject === NULL) {
    $this->fetchedObject = $this
      ->getQueryResult()
      ->fetchObject();
  }
  return $this->fetchedObject;
}