Locker\Helpers\Helpers::replaceFullStopInKeys PHP Method

replaceFullStopInKeys() static public method

* |--------------------------------------------------------------------------- | Mongo doesn't allow full stops in keys, so replace with html entity &46; |---------------------------------------------------------------------------
static public replaceFullStopInKeys ( $string )
    static function replaceFullStopInKeys($string)
    {
        return str_replace('.', '&46;', $string);
    }

Usage Example

 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;
 }
All Usage Examples Of Locker\Helpers\Helpers::replaceFullStopInKeys