protected function decodeUrlEncodedResponse(
        $responseString,
        $requestQuery,
        array $notDecode = null,
        $forceArray = array()
    )
    {
        if (empty($notDecode)) {
            $responseString = urldecode($responseString);
        }

        if (!empty($forceArray)) {
            foreach ($forceArray as $param) {
                $responseString = str_replace($param.'=', $param.'[]=', $responseString);
            }
        }

        // Splitting response body
        $responseArray = [];
        parse_str($responseString, $responseArray);

        if (!empty($notDecode) && is_array($responseArray)) {
            foreach ($responseArray as $index => $value) {
                if (!in_array($index, $notDecode)) {
                    $value = urldecode($value);
                }

                $responseArray[$index] = $value;
            }
        }

        $responseArray['responseString'] = $responseString;
        $responseArray['requestQuery']   = $requestQuery;

        if (!isset($responseArray['errorCode'])) {
            $responseArray['errorCode'] = 99;
            $responseArray['errorMessage'] = $responseString;
        }

        return $responseArray;
    }
protected function decodeUrlEncodedResponse(
        $responseString,
        $requestQuery,
        array $notDecode = null,
        $forceArray = array()
    )
    {
        if (empty($notDecode)) {
            $responseString = urldecode($responseString);
        }

        if (!empty($forceArray)) {
            foreach ($forceArray as $param) {
                $responseString = str_replace($param.'=', $param.'[]=', $responseString);
            }
        }

        // Splitting response body
        $responseArray = [];
        parse_str($responseString, $responseArray);

        if (!empty($notDecode) && is_array($responseArray)) {
            foreach ($responseArray as $index => $value) {
                if (!in_array($index, $notDecode)) {
                    $value = urldecode($value);
                }

                $responseArray[$index] = $value;
            }
        }

        $responseArray['responseString'] = $responseString;
        $responseArray['requestQuery']   = $requestQuery;

        if (!isset($responseArray['errorCode'])) {
            $responseArray['errorCode'] = 99;
            $responseArray['errorMessage'] = $responseString;
        }

        return $responseArray;
    }
protected function decodeUrlEncodedResponse ( $ responseString , $ requestQuery , array $ notDecode = null , $ forceArray = array ( ) ) { if ( empty ( $ notDecode ) ) { $ responseString = urldecode ( $ responseString ) ; } if ( ! empty ( $ forceArray ) ) { foreach ( $ forceArray as $ param ) { $ responseString = str_replace ( $ param . '=' , $ param . '[]=' , $ responseString ) ; } } // Splitting response body $ responseArray = [ ] ; parse_str ( $ responseString , $ responseArray ) ; if ( ! empty ( $ notDecode ) && is_array ( $ responseArray ) ) { foreach ( $ responseArray as $ index => $ value ) { if ( ! in_array ( $ index , $ notDecode ) ) { $ value = urldecode ( $ value ) ; } $ responseArray [ $ index ] = $ value ; } } $ responseArray [ 'responseString' ] = $ responseString ; $ responseArray [ 'requestQuery' ] = $ requestQuery ; if ( ! isset ( $ responseArray [ 'errorCode' ] ) ) { $ responseArray [ 'errorCode' ] = 99 ; $ responseArray [ 'errorMessage' ] = $ responseString ; } return $ responseArray ; }
Decodes a responseString, encoded in query-string-format and returns an response array

@param string   $responseString
@param string   $requestQuery
@param array    $notDecode
@param string[] $forceArray

@return mixed
Decodes a responseString encoded in query - string - format and returns an response array