code: protected function keysToLowerCase($map)
      {
          $lower = array();
          foreach ($map as $key => $value) {
              $lower[strtolower($key)] = $value;
          }
  
          return $lower;
      }
docs: Make the keys lower case for case insensitive look-ups.
  
  @param hash $map   Hash to convert.
  
  @return hash       Unchanged values, but keys lower case.