Open Journal Systems  3.3.0
PhpAggregator.php
1 <?php
2 
4 
6 
11 {
12  public function aggregate($key, $value, QueryString $query)
13  {
14  $ret = array();
15 
16  foreach ($value as $k => $v) {
17  $k = "{$key}[{$k}]";
18  if (is_array($v)) {
19  $ret = array_merge($ret, self::aggregate($k, $v, $query));
20  } else {
21  $ret[$query->encodeValue($k)] = $query->encodeValue($v);
22  }
23  }
24 
25  return $ret;
26  }
27 }
Guzzle\Http\QueryAggregator
Definition: CommaAggregator.php:3
Guzzle\Http\QueryString
Definition: QueryString.php:14
Guzzle\Http\QueryAggregator\PhpAggregator
Definition: PhpAggregator.php:10
Guzzle\Http\QueryAggregator\QueryAggregatorInterface
Definition: QueryAggregatorInterface.php:10
Guzzle\Http\QueryAggregator\PhpAggregator\aggregate
aggregate($key, $value, QueryString $query)
Definition: PhpAggregator.php:12
Guzzle\Http\QueryString\encodeValue
encodeValue($value)
Definition: QueryString.php:246