You are here

function configuration_dom_decode_options in Configuration Management 7

Decode an array of option values that have been encoded by configuration_dom_encode_options().

1 call to configuration_dom_decode_options()
configuration_notracking_form_validate in ./configuration.admin.inc
Validation and formatting the values submitted in the form.

File

./configuration.admin.inc, line 852

Code

function configuration_dom_decode_options($options, $keys_only = FALSE) {
  $replacements = array_flip(array(
    ':' => '__' . ord(':') . '__',
    '/' => '__' . ord('/') . '__',
    ',' => '__' . ord(',') . '__',
    '.' => '__' . ord(',') . '__',
    '<' => '__' . ord('<') . '__',
    '>' => '__' . ord('>') . '__',
  ));
  $encoded = array();
  foreach ($options as $key => $value) {
    $encoded[strtr($key, $replacements)] = $keys_only ? $value : strtr($value, $replacements);
  }
  return $encoded;
}