private function prepareParametersUrl(array $params, array $allowedParams)
    {
        $allowedParams = array_flip($allowedParams);
        $params = array_intersect_key($params, $allowedParams);

        $paramsUrlItems = [];
        foreach ($params as $key => $param) {
            $paramsUrlItems[] = $key . '=' . urlencode($param);
        }

        $paramsUrl = join('&', $paramsUrlItems);
        if (strlen($paramsUrl) > 0) {
            $paramsUrl = '?' . $paramsUrl;
        }

        return $paramsUrl;
    }
private function prepareParametersUrl(array $params, array $allowedParams)
    {
        $allowedParams = array_flip($allowedParams);
        $params = array_intersect_key($params, $allowedParams);

        $paramsUrlItems = [];
        foreach ($params as $key => $param) {
            $paramsUrlItems[] = $key . '=' . urlencode($param);
        }

        $paramsUrl = join('&', $paramsUrlItems);
        if (strlen($paramsUrl) > 0) {
            $paramsUrl = '?' . $paramsUrl;
        }

        return $paramsUrl;
    }
private function prepareParametersUrl ( array $ params , array $ allowedParams ) { $ allowedParams = array_flip ( $ allowedParams ) ; $ params = array_intersect_key ( $ params , $ allowedParams ) ; $ paramsUrlItems = [ ] ; foreach ( $ params as $ key => $ param ) { $ paramsUrlItems [ ] = $ key . '=' . urlencode ( $ param ) ; } $ paramsUrl = join ( '&' , $ paramsUrlItems ) ; if ( strlen ( $ paramsUrl ) > 0 ) { $ paramsUrl = '?' . $ paramsUrl ; } return $ paramsUrl ; }
Prepares params url that can be appended to request.

@param array $params
@param array $allowedParams
@return string
Prepares params url that can be appended to request .