/*
Raw function returning array of poll paramters
171254
function PollParameters()
	{
		$arr[0] = (float)$this->DBParameter('data cache hit ratio');
		$arr[1] = (float)$this->DBParameter('data reads');
		$arr[2] = (float)$this->DBParameter('data writes');
		$arr[3] = (integer) $this->DBParameter('current connections');
		return $arr;
	}
426206
function getRequestParameters()
    {
        $params = $this->getRawParameters();

        $fingerprintOrder = array_merge(
            ['customerId', 'shopId', 'password', 'secret', 'language'],
            $this->fingerprintOrder
        );

        $requiredParameters = array_merge(
            ['customerId', 'requestFingerprint', 'password', 'language'],
            $this->requiredParameters
        );

        switch ($this->getParam('fundTransferType')) {
        case FundTransferType::EXISTINGORDER:
            $fingerprintOrder[] = 'sourceOrderNumber';
            $requiredParameters[] = 'sourceOrderNumber';
            break;
        case FundTransferType::MONETA:
            $fingerprintOrder[] = 'consumerWalletId';
            $requiredParameters[] = 'consumerWalletId';
            break;
        case FundTransferType::SEPA_CT:
            $fingerprintOrder[] = 'bankAccountOwner';
            $fingerprintOrder[] = 'bankBic';
            $fingerprintOrder[] = 'bankAccountIban';
            $requiredParameters[] = 'bankAccountOwner';
            $requiredParameters[] = 'bankBic';
            $requiredParameters[] = 'bankAccountIban';
            break;
        case FundTransferType::SKRILLWALLET:
            $fingerprintOrder[] = 'consumerEmail';
            $requiredParameters[] = 'consumerEmail';
            $requiredParameters[] = 'customerStatement';
            break;
        }

        $params['requestFingerprint'] = Fingerprint::fromParameters($params)
            ->setContext($this->getContext())
            ->setFingerprintOrder($fingerprintOrder);
        $this->assertParametersAreValid($params, $requiredParameters);

        return $params;
    }
437288
function parseUrlParams(params) {
    let qs = '';
    let i = 0;
    each(params, (val, key) => {
        if (i > 0) {
            qs += '&amp;';
        }
        qs += key + '=' + val;
        i += 1;
    })
    return qs;
}
1251750
function parseRequestData($rawInput = NULL)
    {
        try {

            if ($rawInput == NULL)
                throw new Exception ("Input must be defined", 503);

            $result = array();

            if (is_string($rawInput))
                $result = json_decode($rawInput, TRUE);

            if (is_array($rawInput))
                $result = $rawInput;

            if (is_object($rawInput))
                $result = json_decode(json_encode($rawInput), TRUE);

            return $result;

        } catch (Exception $e) {
            die("Exception raised: " . $e->getMessage() . "\nFile: " . $e->getFile() . "\nLine: " . $e->getLine());
        }
    }
105056
function getMethodArgs (args, req, spec) {
    // whether or not response will be JSON
    var json = req.query.json === '1' || req.query.json === 'true'
        || (req.xhr && req.query.json !== '0' && req.query.json !== 'false')
        || (req.headers.accept && req.headers.accept.match(jsonRegExp) && req.query.json !== '0' && req.query.json !== 'false')
        ? true : false
    // build args with session from request
    var methodArgs = {
        json: json,
        session: req.session || {},
    }
    // get input based on spec
    _.each(spec.input, (src, dst) => {
        // if source is array then it is list of possible values
        if (Array.isArray(src)) {
            var srcLength = src.length
            // check each source value and take first
            for (var i=0; i < srcLength; i++) {
                var val = _.get(req, src[i])
                // if value found then use and break
                if (defined(val)) {
                    methodArgs[dst] = val
                    break
                }
            }
        }
        // otherwise source should be string property name
        else {
            methodArgs[dst] = _.get(req, src)
        }
    })
    // get controller
    var controller = args.route.controller
    // get model
    var model = args.route.model
    // if model data is being submitted do some normalization
    if (controller && controller.form && model && methodArgs[model.name]) {
        var data = methodArgs[model.name]
        // iterate over fields
        _.each(controller.form.fields, field => {
            if (Array.isArray(field)) {
                _.each(field, field => {
                    normalizeInput(data, field)
                })
            }
            else {
                normalizeInput(data, field)
            }
        })
    }
    // return args
    return methodArgs
}
9372
function getSurveySettings (defOptions, credentials, token, surveyId, callback) {
  
  if (typeof surveyId === 'function') callback = surveyId;
  if (checkRequiredParameter(surveyId)) return Promise.reject(Error(`Missing required parameter 'SurveyId'`)).nodeify(callback);
  
  var options = {
    method : 'GET',
    uri : `v1/Surveys/${surveyId}/Settings`
  };
  
  return requestWithTokenCheck(defOptions, credentials, token, options, callback);
}
863949
function __toArray()
    {
        $params = __( new HydrateGetters($this) )
            ->setExcludeNullValues();

        $params = StdTravers::of($params)->toArray(null, true);
        return $params;
    }
1002103
function queryParamsState(queryParamsArray, controller) {
  return queryParamsArray.reduce(
    (state, qp) => {
      let value = qp.value(controller);

      state[qp.key] = {
        value,
        serializedValue: qp.serializedValue(controller),
        as: qp.as,
        defaultValue: qp.defaultValue,
        changed: JSON.stringify(value) !== JSON.stringify(qp.defaultValue)
      };
      return state;
    },
    {},
    undefined
  );
}
1016274
function getQueryString ( $oauth_as_header = true )
	{
		$parms = array();
		foreach ($this->param as $name => $value)
		{
			if (	!$oauth_as_header 
				||	(strncmp($name, 'oauth_', 6) != 0 && strncmp($name, 'xoauth_', 7) != 0))
			{
				if (is_array($value))
				{
					foreach ($value as $v)
					{
						$parms[] = $name.'='.$v;
					}
				}
				else
				{
					$parms[] = $name.'='.$value;
				}
			}
		}
		return implode('&', $parms);
	}
1217620
async function (opt) {
		opt.create = false;

		const values = [];
		const results = await this.traverse(opt);

		for (const result  of results) {
			if (result.data[result.key] === opt.value) {
				values.push(result);
			}
		}

		return values;
	}
26885
function getParams (req) {
  if (req.swagger && req.swagger.params) {
    return req.swagger.params;
  }
  return [];
}
662976
public function getValues(string $rawString)
    {
        $regExp = $this->getStrRegExp();
        $params = $this->getParameters();
        $matches = [];

        preg_match_all($regExp, $rawString, $matches);
        array_shift($matches);

        $map = function ($match) {
            return isset($match[0]) ? $match[0] : null;
        };

        return array_combine($params, array_map($map, $matches));
    }
471847
function ( arg ) {
		var result;

		if ( !arg ) {
			return;
		}

		arg = string.trim( arg );

		if ( arg.indexOf( "," ) === -1 ) {
			result = utility.dom( arg );
		}
		else {
			result = [];

			array.each( string.explode( arg ), function ( query ) {
				var obj = utility.dom( query );

				if ( obj instanceof Array ) {
					result = result.concat( obj );
				}
				else if ( obj ) {
					result.push( obj );
				}
			});
		}

		return result;
	}
997919
function(params, sep, eq) {
        var query = '',
            value,
            typeOf,
            tmpArray,
            i, size, key;

        if ( ! params) {
            return query;
        }

        sep || (sep = '&');
        eq || (eq = '=');

        for (key in params) {
            if (hasOwnProp.call(params, key)) {
                tmpArray = [].concat(params[key]);
                for (i = 0, size = tmpArray.length; i < size; ++i) {
                    typeOf = typeof tmpArray[i];

                    if (typeOf === 'object' || typeOf === 'undefined') {
                        value = '';
                    } else {
                        value = encodeURIComponent(tmpArray[i]);
                    }

                    query += sep + encodeURIComponent(key) + eq + value;
                }
            }
        }

        return query.substr(sep.length);
    }
1023597
function() {
  var args = Array.from(arguments)
  var url = _.get(args, '[0]', '')
  var params = _.get(args, '[1]', {})

  // if we specify all of the options as a param object, we're basically done
  // and we can skip all of the parameterization checks below
  if (_.isPlainObject(_.get(args, '[0]', {})))
  {
    params = _.get(args, '[0]', {})
  }
   else
  {
    params = _.assign({}, { url }, params)
  }

  return _.assign({}, params, { op: 'request' })
}
984335
function functionParameters(f) {
  assert(typeof f === 'function');
  var matches = functionRegex.exec(f.toString());
  if(!matches || !matches[2].length) {
    return [];
  }
  return matches[2].split(/[,\s]+/).filter(function(str) {
    return str.length;
  });
}
408366
function(raw_records_array) {

		var i = 0,
			count = raw_records_array.length,
			records = [];

		for (; i < count; i++) {

			records.push(this._createRecordInstance(raw_records_array[i]));

		}

		this._fire('records_loaded', {records: records});

		return records;

	}