Url encode parameter data.
If a parameter value is an array and no aggregator has been set, the values of the array will be converted into a PHP compatible form array. If an aggregator is set, the values will be converted using the aggregator function
array $data The data to encode:
array Returns an array of encoded values and keys
protected function encodeData(array $data) {
$temp = array();
foreach ($data as $key => $value) {
if (is_array($value)) {
$temp = array_merge($temp, call_user_func_array($this->aggregator, array(
$key,
$value,
$this->urlEncode,
)));
}
else {
if ($this->urlEncode) {
$temp[rawurlencode($key)] = rawurlencode($value);
}
else {
$temp[$key] = (string) $value;
}
}
}
return $temp;
}