You are here

protected function SensorManager::isFlatArray in Monitoring 7

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

Returns if an array is flat.

Parameters

$array: The array to check.

Return value

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

1 call to SensorManager::isFlatArray()
SensorManager::mergeSettingsArrays in lib/Drupal/monitoring/Sensor/SensorManager.php
Merges settings arrays.

File

lib/Drupal/monitoring/Sensor/SensorManager.php, line 339
Contains \Drupal\monitoring\Sensor\SensorManager.

Class

SensorManager
Manages sensor definitions and settings.

Namespace

Drupal\monitoring\Sensor

Code

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