camelCaseToDelimiter() public static method

find capitals and convert to delimiter + lowercase
public static camelCaseToDelimiter ( string $string, null | string $delimiter = '-' ) : string
$string string
$delimiter null | string
return string modified string
 private function _underscoreKeys($array)
 {
     foreach ($array as $key => $value) {
         $newKey = Util::camelCaseToDelimiter($key, '_');
         unset($array[$key]);
         if (is_array($value)) {
             $array[$newKey] = $this->_underscoreKeys($value);
         } else {
             $array[$newKey] = $value;
         }
     }
     return $array;
 }