You are here

protected function SensorManager::isFlatArray in Monitoring 8

Same name and namespace in other branches
  1. 7 lib/Drupal/monitoring/Sensor/SensorManager.php \Drupal\monitoring\Sensor\SensorManager::isFlatArray()

Returns if an array is flat.

Parameters

array $array: The array to check.

Return value

bool TRUE if the array has no values that are arrays again.

File

src/Sensor/SensorManager.php, line 331
Contains \Drupal\monitoring\Sensor\SensorManager.

Class

SensorManager
Manages sensor definitions and settings.

Namespace

Drupal\monitoring\Sensor

Code

protected function isFlatArray(array $array) {
  foreach ($array as $value) {
    if (is_array($value)) {
      return FALSE;
    }
  }
  return TRUE;
}