src/Robo/Common/ArrayManipulator.php
public static function convertArrayToFlatTextArray(array $array) {
    $rows = [];
    $max_line_length = 60;
    foreach ($array as $key => $value) {
      if (is_array($value)) {
        $flattened_array = self::flattenToDotNotatedKeys($value);
        foreach ($flattened_array as $sub_key => $sub_value) {
          if ($sub_value === TRUE) {
            $sub_value = 'true';
          }
          elseif ($sub_value === FALSE) {
            $sub_value = 'false';
          }
          $rows[] = [
            "$key.$sub_key",
            wordwrap($sub_value, $max_line_length, "\n", TRUE),
          ];
        }
      }
      else {
        if ($value === TRUE) {
          $contents = 'true';
        }
        elseif ($value === FALSE) {
          $contents = 'false';
        }
        else {
          $contents = wordwrap($value, $max_line_length, "\n", TRUE);
        }
        $rows[] = [$key, $contents];
      }
    }

    return $rows;
  }
public static function convertArrayToFlatTextArray(array $array) {
    $rows = [];
    $max_line_length = 60;
    foreach ($array as $key => $value) {
      if (is_array($value)) {
        $flattened_array = self::flattenToDotNotatedKeys($value);
        foreach ($flattened_array as $sub_key => $sub_value) {
          if ($sub_value === TRUE) {
            $sub_value = 'true';
          }
          elseif ($sub_value === FALSE) {
            $sub_value = 'false';
          }
          $rows[] = [
            "$key.$sub_key",
            wordwrap($sub_value, $max_line_length, "\n", TRUE),
          ];
        }
      }
      else {
        if ($value === TRUE) {
          $contents = 'true';
        }
        elseif ($value === FALSE) {
          $contents = 'false';
        }
        else {
          $contents = wordwrap($value, $max_line_length, "\n", TRUE);
        }
        $rows[] = [$key, $contents];
      }
    }

    return $rows;
  }
public static function convertArrayToFlatTextArray ( array $ array ) { $ rows = [ ] ; $ max_line_length = 60 ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ flattened_array = self :: flattenToDotNotatedKeys ( $ value ) ; foreach ( $ flattened_array as $ sub_key => $ sub_value ) { if ( $ sub_value === TRUE ) { $ sub_value = 'true' ; } elseif ( $ sub_value === FALSE ) { $ sub_value = 'false' ; } $ rows [ ] = [ "$key.$sub_key" , wordwrap ( $ sub_value , $ max_line_length , "\n" , TRUE ) , ] ; } } else { if ( $ value === TRUE ) { $ contents = 'true' ; } elseif ( $ value === FALSE ) { $ contents = 'false' ; } else { $ contents = wordwrap ( $ value , $ max_line_length , "\n" , TRUE ) ; } $ rows [ ] = [ $ key , $ contents ] ; } } return $ rows ; }
Converts a multi-dimensional array to a human-readable flat array.

Used primarily for rendering tables via Symfony Console commands.

@param array $array
The multi-dimensional array.

@return array
The human-readble, flat array.
Converts a multi - dimensional array to a human - readable flat array .