Set the parameters of the Confirmation object

@param array $parameters cleanUp the given Array to only the once valid property names, see CONFIRMATION_PROPERTIES

@return array
189616
public static function cleanUpArray(array $parameters)
    {
        $cleanup = [];

        foreach ($parameters as $name => $value) {
            if (array_key_exists($name, self::CONFIRMATION_PROPERTIES)) {
                $cleanup[$name] = $value;
            }
        }

        return $cleanup;
    }
759703
private function checkResultParameters(array $parameters)
    {
        $elementsMissing = array_diff([
            'Ds_Date',
            'Ds_Hour',
            'Ds_Amount',
            'Ds_Currency',
            'Ds_Order',
            'Ds_MerchantCode',
            'Ds_Terminal',
            'Ds_Signature',
            'Ds_Response',
            'Ds_TransactionType',
            'Ds_SecurePayment',
            'Ds_Card_Country',
            'Ds_AuthorisationCode',
            'Ds_ConsumerLanguage',
        ], $parameters);

        if (!empty($elementsMissing)) {
            throw new ParameterNotReceivedException(
                implode(', ', $elementsMissing)
            );
        }
    }
730655
protected function normalize(array $parameters)
    {
        foreach ($parameters as $parameter => $value) {
            if (null !== $this->knownParameters[$parameter]) {
                $parameters[$parameter] = sprintf($this->knownParameters[$parameter], $value);
            }
        }

        return $parameters;
    }
768621
protected function replaceDefaults(array $parameters)
    {
        foreach ($parameters as $key => &$value) {
            $value = isset($value) ? $value : ArrayHelper::get($this->defaults, $key);
        }
        foreach ($this->defaults as $key => $value) {
            if (!isset($parameters[$key])) {
                $parameters[$key] = $value;
            }
        }

        return $parameters;
    }
181245
public function addParameters(array $parameters)
    {
        self::$global_parameters = array_merge(self::$global_parameters, $parameters);

        return self::getInstance();
    }
77377
public function setParameters(array $parameters)
    {
        foreach ($parameters as $iteration => $value) {
            // Trim whitespaces
            $value = trim($value);

            switch ($iteration) {
                case 0: // Debug mode
                    $this->debug = ($value == 'debug') ? true : false;
                    break;
                case 1: // Platform name and version
                    $this->platform = $value;
                    break;
                case 2: // Device name
                    $this->device = $value;
                    break;
            }
        }

        return $this;
    }
88799
public function setParameters(array $parameters) {
		$this->parameters = [];
		foreach ($parameters as $parameter) {
			$this->addParameter($parameter);
		}

		return $this;
	}
1348848
public function set(array $parameters)
    {
        foreach ($parameters as $parameter => $value) {
            $this->add($parameter, $value);
        }
        return $this;
    }
1023385
private function parameters($parameters): array
    {
        $values = (!is_array($parameters)) ? [$parameters] : $parameters;

        $strings = [];

        foreach ($values as $value) {
            $strings[] = self::make($value, $this->encoding);
        }

        return $strings;
    }
775637
protected function flattenParameters(array $parameters)
	{
		$flattened = array();

		foreach($parameters as $parameter) {
			array_walk($parameter, function($value, $key) use (&$flattened) {
				$flattened[$key] = $value;
			});
		}

		return $flattened;
	}
576748
public function getParameters(array $parameters = []): array
    {
        foreach (array_merge($parameters, $this->getParameterArray()) as $parameter) {
            if (isset($this->$parameter)) {
                $parameters[$parameter] = $this->$parameter;
            }
        }
        foreach ($this->extraParameters as $parameter => $function) {
            $parameters[$parameter] = $this->$function();
        }
        return $this->filterArray($parameters);
    }
100160
public function validateParameters(&$parameters)
    {
        if (!isset($parameters['username']))
        {
            throw new InvalidArgumentException(
                'The \'username\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
        elseif (!isset($parameters['password']))
        {
            throw new InvalidArgumentException(
                'The \'password\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
    }
988248
private function getParameterNamesForDecoratedCall(array $parameters) : array
    {
        return array_map(
            static function (ReflectionParameter $parameter) {
                $name = '';

                if (method_exists($parameter, 'isVariadic')) {
                    if ($parameter->isVariadic()) {
                        $name .= '...';
                    }
                }

                return $name . '$' . $parameter->name;
            },
            $parameters
        );
    }
1193010
public static function parseParameters(array $parameters)
    {
        //TODO: let 2nd parameter be both title, or default query parameters
        //TODO: needs some checks before determining $title
        $explodeResult    = self::explodeSortParameter($parameters[0]);
        $sortColumn       = (empty($explodeResult)) ? $parameters[0] : $explodeResult[1];
        $title            = (count($parameters) === 1) ? $sortColumn : $parameters[1];
        $queryParameters  = (isset($parameters[2]) && is_array($parameters[2])) ? $parameters[2] : [];
        $anchorAttributes = (isset($parameters[3]) && is_array($parameters[3])) ? $parameters[3] : [];

        return [$sortColumn, $parameters[0], $title, $queryParameters, $anchorAttributes];
    }
61410
private function castObjectsAsArrays(array $parameters)
    {
        foreach ($parameters as $key => $value) {
            if (is_object($value)) {
                $value = (array) $value;
                $parameters[$key] = $value;
            }
            if (is_array($value)) {
                $parameters[$key] = $this->castObjectsAsArrays($value);
            }
        }
        return $parameters;
    }
432115
protected function createParameters($parameters)
    {
        if (is_string($parameters)) {
            $parameters = Parameters::parse($parameters);
        } else {
            $parameters = $parameters ?: array();
        }

        if ($this->defaults) {
            $parameters += $this->defaults;
        }

        return new Parameters($parameters);
    }
305988
protected function setParameters(array $parameters = array())
    {
        foreach ($parameters as $parameterKey => $parameterValue) {
            $this->container->setParameter($parameterKey, $parameterValue);
        }
    }