*
|---------------------------------------------------------------------------
| Mongo doesn't allow full stops in keys, so replace with html entity &46;
|---------------------------------------------------------------------------
static public replaceFullStopInKeys ( $string ) |
private static function migrateQuery(array $query) { $output = []; foreach ($query as $key => $value) { if (is_array($value)) { $value = array_map('urldecode', $value); } $new = \Locker\Helpers\Helpers::replaceFullStopInKeys($key); $output[$new] = $value; } return $output; }
static function replaceFullStop($array) { $output = []; if (!empty($array)) { foreach ($array as $key => $value) { if (is_array($value)) { $new = Helpers::replaceFullStopInKeys($key); $output[$new] = Helpers::replaceFullStop($value); } else { $new = Helpers::replaceFullStopInKeys($key); $output[$new] = $value; } } } return $output; }