Zend_Http_Client::_getParametersRecursive PHP Method

_getParametersRecursive() protected method

The method returns an array of (key, value) pairs (because keys are not necessarily unique. If one of the parameters in as array, it will also add a [] suffix to the key. This method is deprecated since Zend Framework 1.9 in favour of self::_flattenParametersArray() and will be dropped in 2.0
Deprecation: since 1.9
protected _getParametersRecursive ( array $parray, boolean $urlencode = false ) : array
$parray array The parameters array
$urlencode boolean Whether to urlencode the name and value
return array
    protected function _getParametersRecursive($parray, $urlencode = false)
    {
        // Issue a deprecated notice
        trigger_error("The " . __METHOD__ . " method is deprecated and will be dropped in 2.0.", E_USER_NOTICE);
        if (!is_array($parray)) {
            return $parray;
        }
        $parameters = array();
        foreach ($parray as $name => $value) {
            if ($urlencode) {
                $name = urlencode($name);
            }
            // If $value is an array, iterate over it
            if (is_array($value)) {
                $name .= $urlencode ? '%5B%5D' : '[]';
                foreach ($value as $subval) {
                    if ($urlencode) {
                        $subval = urlencode($subval);
                    }
                    $parameters[] = array($name, $subval);
                }
            } else {
                if ($urlencode) {
                    $value = urlencode($value);
                }
                $parameters[] = array($name, $value);
            }
        }
        return $parameters;
    }