Filter http request parameters
@param array $requestParameters
193861
private function filterRequestParameters(array $httpRequest)
    {
        //filter request for Sips parameters
        if (!array_key_exists(self::DATA_FIELD, $httpRequest) || $httpRequest[self::DATA_FIELD] == '') {
            throw new InvalidArgumentException('Data parameter not present in parameters.');
        }
        $parameters = array();
        $dataString = $httpRequest[self::DATA_FIELD];
        $this->dataString = $dataString;
        $dataParams = explode('|', $dataString);
        foreach ($dataParams as $dataParamString) {
            $dataKeyValue = explode('=', $dataParamString, 2);
            $parameters[$dataKeyValue[0]] = $dataKeyValue[1];
        }

        return $parameters;
    }
529411
private function extractFilters(array $params)
    {
        if (false === $this->issetNotEmpty(self::PARAM_FILTERING, $params)) {
            return $this;
        }
        $filters = $params[self::PARAM_FILTERING];
        if (!is_array($filters)) {
            throw RestException::invalidQueryParam(self::PARAM_FILTERING, 'The filter parameter must be an array keyed by filter name and value.');
        }
        foreach ($filters as $key => $value) {
            $this->filters[$key] = $value;
        }
        return $this;
    }
591001
private function retrieveFilter(Request $request)
    {
        $filter = [];
        $ids = $request->get('ids');

        if ($ids) {
            if (is_string($ids)) {
                $ids = explode(',', $ids);
            }

            $filter['id'] = $ids;
        }

        return $filter;
    }
257504
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;
    }
264770
public function submit(RequestParameters $params)
    {
        $handle = $this->curl->init($this->siteVerifyUrl);

        $options = array(
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => $params->toQueryString(),
            CURLOPT_HTTPHEADER => array(
                'Content-Type: application/x-www-form-urlencoded'
            ),
            CURLINFO_HEADER_OUT => false,
            CURLOPT_HEADER => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_SSL_VERIFYPEER => true
        );
        $this->curl->setoptArray($handle, $options);

        $response = $this->curl->exec($handle);
        $this->curl->close($handle);

        if ($response !== false) {
            return $response;
        }

        return '{"success": false, "error-codes": ["'.ReCaptcha::E_CONNECTION_FAILED.'"]}';
    }
263093
protected function params(Request $request, array $params, $default = null)
    {
        $data = [];
        foreach ($params as $param) {
            $data[$param] = $request->getParam($param, $default);
        }

        return $data;
    }
942264
public function convertToDeclined($requestParams)
    {
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_FORM);
        $requiredParams = array("id");
        return $this->client->request($requestParams, $this->_mainTransactionEndpoint . "/" . self::CONVERT_DECLINE, "put", $requiredParams, $options);
    }
1362089
public function filter($className, $parameters = array())
    {
        foreach ($this->getDataTables() as $table) {
            $table->filter($className, $parameters);
        }
    }
1073256
protected function extractCustomParams(array $params = array())
    {
        foreach ($params as $name => $values) {
            foreach ($this->services as $host => $service) {
                if (preg_match('~' . preg_quote($name, '~') . '~i', $service)) {
                    $this->customParams[$host] = (array) $values;
                }
            }
        }
    }
1317049
public function filter_user( $params ){

		if(!is_user_logged_in() ){
			return $params;
		}
		$user = get_userdata( get_current_user_id() );
		if(isset( $user->data->{$params} )){
			$params = $user->data->{$params};
		}

		$is_meta = get_user_meta( $user->ID, $params, true );
		if( !empty( $is_meta ) ){
			$params = implode( ', ', (array) $is_meta );
		}

		return $params;
	}
327367
protected function _params_filter($parameters = array()){
    $params = array();
    foreach($parameters as $key => $val) {
        if ($key == "Signature" ||$val === "" || $val === NULL){
          continue;
        } else {
          $params[$key] = $parameters[$key];
        }
    }
    ksort($params);
    reset($params);
    return $params;
  }
1252593
private function filterParameter($parameter)
    {
        $para = [];
        foreach ($parameter as $key => $value) {
            if ('' == $value || 'm' == $key || 'a' == $key || 'c' == $key || 'code' == $key)
                continue;
            else
                $para [$key] = $value;
        }
        return $para;
    }
134664
public function subscribe($requestParams)
    {
        $requiredParams = array("event","url");
        return $this->client->request($requestParams, $this->_endpoint . "/" . self::SUBSCRIBE, "post", $requiredParams, $options = NULL);
    }
1355416
public function filterItineraryParamsToPropagate($params)
    {
        $res = [];

        foreach ($params as $key => $value) {
            if (!empty($value) && is_string($value)) {
                $res[$key] = $value;
            }
        }

        return $res;
    }
1157520
public function getUrlForMergedParameters($queryParameters)
    {
        if ($this->hasQueryString()) {
            $querystring = new QueryString($this->getQueryString());
            $querystring->addParameters($queryParameters);
            $queryParameters = $querystring->toArray();
        }

        return $this->getUrlForParameters($queryParameters);
    }
230998
protected function _create($requestParams)
    {
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_FORM);
        return $this->client->request($requestParams, $this->_endpointPlural, "post", $requiredParams = NULL, $options);
    }
143782
protected function processQueryParameters($queryParams)
    {
        foreach ($queryParams as $name => $value) {
            if (is_bool($value)) {
                $queryParams[$name] = $value ? 'true' : 'false';
            }
        }
        return $queryParams;
    }