src/Utils/Data.php
public static function ensureArrayKeys($key) {
    if (empty($key)) {
      return array();
    }
    if (!is_array($key)) {
      if (strstr($key, '|')) {
        $key = str_replace('|', self::ARRAY_DELIMITER, $key);
      }
      $key = explode(self::ARRAY_DELIMITER, $key);
    }
    return $key;
  }
public static function ensureArrayKeys($key) {
    if (empty($key)) {
      return array();
    }
    if (!is_array($key)) {
      if (strstr($key, '|')) {
        $key = str_replace('|', self::ARRAY_DELIMITER, $key);
      }
      $key = explode(self::ARRAY_DELIMITER, $key);
    }
    return $key;
  }
public static function ensureArrayKeys ( $ key ) { if ( empty ( $ key ) ) { return array ( ) ; } if ( ! is_array ( $ key ) ) { if ( strstr ( $ key , '|' ) ) { $ key = str_replace ( '|' , self :: ARRAY_DELIMITER , $ key ) ; } $ key = explode ( self :: ARRAY_DELIMITER , $ key ) ; } return $ key ; }
Converts string keys to array keys.

There are three conventions for data keys in use. This function accepts each
and ensures an array of keys.

@param array|string $key
The key can be either be an array containing the keys of a nested array
hierarchy path or a string with '][' or '|' as delimiter.

@return array
Array of keys.
Converts string keys to array keys .