You are here

private function ApacheMatcherDumper::normalizeValues in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Matcher/Dumper/ApacheMatcherDumper.php \Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper::normalizeValues()

Normalizes an array of values.

Parameters

array $values:

Return value

string[]

1 call to ApacheMatcherDumper::normalizeValues()
ApacheMatcherDumper::dumpRoute in vendor/symfony/routing/Matcher/Dumper/ApacheMatcherDumper.php
Dumps a single route.

File

vendor/symfony/routing/Matcher/Dumper/ApacheMatcherDumper.php, line 263

Class

ApacheMatcherDumper
Dumps a set of Apache mod_rewrite rules.

Namespace

Symfony\Component\Routing\Matcher\Dumper

Code

private function normalizeValues(array $values) {
  $normalizedValues = array();
  foreach ($values as $key => $value) {
    if (is_array($value)) {
      foreach ($value as $index => $bit) {
        $normalizedValues[sprintf('%s[%s]', $key, $index)] = $bit;
      }
    }
    else {
      $normalizedValues[$key] = (string) $value;
    }
  }
  return $normalizedValues;
}