fix paramters

@param  array &$data parameter data
@return void
@access protected
356367
protected function fixParameters(array &$data)
    {
        foreach ($data as $name => $value) {
            if (is_array($value)) {
                $this->fixParameters($value);
            }
            $parts  = explode('.', $name);
            $result = &$data;
            while (null !== ($part = array_shift($parts))) {
                if (count($parts)) {
                    if (!isset($result[$part])) {
                        $result[$part] = [];
                    }
                    $result = &$result[$part];
                } else {
                    $result[$part] = $value;
                }
            }
        }
    }
626459
protected function doSetFrom($data)
    {
        foreach($data as $k => $v)
            $this->__set($k, $v);
    }
659324
public function setParams(array $data = [], $reset = false)
    {
        if ($reset) {
            $this->_data = $data;
        }
        foreach ($data as $key => $value) {
            $this->__set($key, $value);
        }
        return $this;
    }
990242
protected function clearDynamic(array &$data)
    {
        if (!$this->schema->dynamic) {
            $data = array_intersect_key($data, $this->schema->fields);
        }
    }
61922
public function setData(array $data): void {
		if ($this->compiled) {
			throw new ViewException("Attempt to alter view after compilation.", ViewException::AFTER_COMPILE_ALTERATION);
		}
		// to avoid overwriting any data that has already been set
		// using setDatum(), we don't want to do a simple assignment.
		// instead, we'll more carefully copy information from $data
		// to the data property.
		
		foreach ($data as $index => $datum) {
			$this->setDatum($index, $datum);
		}
	}
44246
protected function fixupParameter( &$parameter )
    {
        if ( is_array( $parameter ) )
        {
            foreach ( $parameter as &$subParameter )
            {
                $this->fixupParameter( $subParameter );
            }
        }

        if ( $parameter instanceof stdClass )
        {
            if ( isset( $parameter->xmlrpc_type ) && $parameter->xmlrpc_type == 'datetime' )
            {
                $parameter = new DateTime( date( "Ymd\TH:i:s", $parameter->timestamp ) );
            }
            else if ( isset( $parameter->xmlrpc_type ) && $parameter->xmlrpc_type == 'base64' )
            {
                $parameter = (string)$parameter->scalar;
            }
        }
    }
1094263
private static function sanitize(array &$data)
    {
        $blackList = array_combine(self::config()->loggingBlacklist, self::config()->loggingBlacklist);
        array_walk_recursive($data, function (&$value, $key) use ($blackList) {
            if (isset($blackList[$key])) {
                $value = '(sanitized)';
            }
        });
    }
841054
public function solveResolutions(array $data)
    {
        return null !== $this->resolutionManager
            ? $this->resolutionManager->solveResolutions($data)
            : $data;
    }
1048793
public static function set_meta_data($data)
    {
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                self::$meta_data[strtolower($key)] = $value;
            }
        } else {
            user_error("set_meta_data must be passed an array", E_USER_ERROR);
        }
    }
210716
public function updateData(array $data) {
        foreach($data as $name => $value) {
            $this->data[$name] = $value;
        }
    }
329696
public function repairString($data, $config = NULL, $encoding = NULL, $data, $config = NULL, $encoding = NULL)
    {
    }
1370849
private function fixArray($data, $key = null)
    {
        if (!is_array($data) || ($key && isset($data[$key]))) {
            $data = [$data];
        }

        // SORT_REGULAR = compare items normally (don't change types)
        return array_unique($data, SORT_REGULAR);
    }
1280101
public function update_config(&$data) {
        if (!empty($data->criteria_unenrol)) {
            $this->course = $data->id;
            $this->insert();
        }
    }
425516
protected function doSetFrom($data)
    {
        foreach ($data as $k => $v)
            $this->set($k, $v);
    }
144094
private function processData(array $data): void
    {
        foreach ($data['formatters'] as $locale => $f) {
            if (!isset($this->formatters[$locale])) {
                $this->formatters[$locale] = array();
            }
            
            foreach ($f as $formatter => $d) {
                $calendar = \IntlDateFormatter::GREGORIAN;
                if (isset($d['calendar']) && $d['calendar'] === 'traditional') {
                    $calendar = \IntlDateFormatter::TRADITIONAL;
                }
                
                $this->formatters[$locale][$formatter] = new \IntlDateFormatter($locale, null, null, null, $calendar, $d['pattern']);
            }
        }
    }
418189
private function validate(array $data) : void
    {
        $diff = array_diff(self::REQUIRED_PARAMS, array_keys($data));

        if (! empty($diff)) {
            throw new \InvalidArgumentException(
                sprintf('Search criteria is missing required parameter(s): %s', implode(', ', $diff))
            );
        }

        if (! is_string($data['field'])) {
            throw new \InvalidArgumentException('Field parameter must be a string');
        }

        if (! is_string($data['operator'])) {
            throw new \InvalidArgumentException('Operator parameter must be a string');
        }

        if (! is_scalar($data['value']) && ! is_array($data['value'])) {
            throw new \InvalidArgumentException(sprintf('Unsupported value type provided: %s', gettype($data['value'])));
        }
    }
348706
protected function setPrice(array &$data)
    {
        if (!empty($data['price']) && !empty($data['currency'])) {
            $data['price'] = $this->price->amount($data['price'], $data['currency']);
        }
    }