Converts keys array to string key.
There are three conventions for data keys in use. This function accepts each of it and ensures a string key.
array|string $key: The key can be either be an array containing the keys of a nested array hierarchy path or a string.
string $delimiter: Delimiter to be use in the keys string. Default is ']['.
string Keys string.
public function ensureStringKey($key, $delimiter = Data::TMGMT_ARRAY_DELIMITER) {
if (is_array($key)) {
$key = implode($delimiter, $key);
}
return $key;
}