Sets class parameters

@param array $classParams
@return array
187750
public function setClassParameters($classParams)
    {
        $object = $this->getObject();
        $tableName = $object->getCoreTableName();
        $values = array();
        foreach ($classParams as $sParamKey => $paramValue) {
            if (is_int($sParamKey)) {
                $fieldName = $this->_getFieldName($tableName, $paramValue);
                $values[$paramValue] = $object->$fieldName->value;
            } else {
                $fieldName = $this->_getFieldName($tableName, $sParamKey);
                if (is_string($paramValue)) {
                    $paramValue = html_entity_decode($paramValue);
                }
                $object->$fieldName = new \OxidEsales\Eshop\Core\Field($paramValue);
            }
        }

        return $values;
    }
1031283
public function setParams(array $params)
    {
        // Is this an associative array?
        if (!empty($params)) {
            if (\count(array_filter(array_keys($params), '\is_string')) < 1) {
                throw new ParseIncludesException('Parameters must be an associative array indexed by key');
            }
        }
        $this->params = $params;

        return $this;
    }
828280
public function addQueryParams(array $queryParams)
    {
        $this->data['query'] = array_merge(Helper::getValue($this->data['query'], []), $queryParams);
        $this->data['query'] = array_filter($this->data['query']);
        return $this;
    }
581417
protected function setFromTypes(array $params)
    {
        if (count($params) != count($this->valueMap)) {
            $numParams = count($params);
            $expectedParams = count($this->valueMap);
            throw new \InvalidArgumentException("Expected {$expectedParams} parameters, got {$numParams}");
        }
        
        foreach ($params as $key => $value) {
            if (is_object($value)) {
                if (!$value instanceof $this->valueMap[$key]['class']) {
                    $c = get_class($value);
                    throw new \InvalidArgumentException("Invalid Type ({$c}) at position {$key}");
                }
                $this->value[$this->valueMap[$key]['name']] = clone $value;
                continue;
            }
            $t = gettype($value);
            if ($t != $this->valueMap[$key]['class']) {
                throw new \InvalidArgumentException("Invalid Type ({$t}) at position {$key}");
            }
            $this->value[$this->valueMap[$key]['name']] = $value;
        }
    }
1239721
protected function setParams($params)
    {
        $this->params = $this->default_params;
        foreach ($params as $name => $value) {
            $method = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($name))));
            if (!method_exists($this, $method)) {
                throw new Exception\InvalidArgumentException(__METHOD__ . " Parameter '$name' does not exists.");
            }
            $this->$method($value);
        }
    }
294689
protected static function reflectionParameterToArray(array $params): array
    {
        $return = [];
        foreach ($params as $param) {
            $array = [
                'name' => $param->name,
                'type' => self::getParameterType($param),
            ];

            if ($param->isOptional()) {
                $array['default'] = $param->getDefaultValue();
            } elseif ($array['type'] && $param->allowsNull()) {
                $array['default'] = null;
            }

            $reflection = $param->getDeclaringFunction();
            $array['file'] = $reflection->getFileName();
            $array['line'] = $reflection->getStartLine();

            $return[] = $array;
        }

        return $return;
    }
769110
public function params($requestParams): array
    {
        // apply type and default value for request params
        $params = [];
        foreach ($this->params as $param => $type) {
            if (isset($requestParams[$param])) {
                switch ($type) {
                    case 'bool':
                    case 'boolean':
                        $params[] = (bool)$requestParams[$param];
                        break;
                    case 'int':
                    case 'integer':
                        $params[] = (int)$requestParams[$param];
                        break;
                    case 'float':
                        $params[] = (float)$requestParams[$param];
                        break;
                    case 'string':
                        $params[] = (string)$requestParams[$param];
                        break;
                    case 'array':
                        $params[] = (array)$requestParams[$param];
                        break;
                    default:
                        $params[] = $requestParams[$param];
                        break;
                }
            } elseif (isset($this->values[$param])) {
                $params[] = $this->values[$param];
            } else {
                $params[] = null;
            }
        }
        return $params;
    }
1127463
public function setProgramParams(array $programParams)
    {
        // Store result
        $this->_programParams = $programParams;

        if (! $this->_readonly) {
            $this->session->requestCache[$this->getStorageKey()] = $programParams;
        }

        return $this;
    }
1181389
public function setParams($params)
    {
        if (is_array($params) && isset($params['application'])) {
            $this->setApplicationEntity($params['application']);
            unset($params['application']);
        } elseif (is_object($params) && isset($params->application)) {
            $this->setApplicationEntity($params->application);
        }

        if (is_array($params) && isset($params['user'])) {
            $this->setUser($params['user']);
            unset($params['user']);
        }

        if (is_array($params) && isset($params['status'])) {
            $this->setStatus($params['status']);
            unset($params['status']);
        }

        return parent::setParams($params);
    }
1168538
public function setPostParameters(array $postParameters)
    {
        foreach ($postParameters as $k => $v) {
            $this->_postParams[$k] = $v;
        }
    }
832269
public function setParamsSort(array $params) {
        if (is_numeric(key($params)) && key($params) == 0) {
            $tmp = [];
            foreach ($params as $key => $value) {
                $tmp[$key + 1] = $value;
            }
            $params = $tmp;
        }

        return $params;
    }
775376
private function createAssignsFromParams(array $params): array
    {
        $assigns = [];

        /** @var Param $param */
        foreach ($params as $param) {
            $propertyFetch = new PropertyFetch(new Variable('this'), $param->var->name);
            $assigns[] = new Assign($propertyFetch, new Variable($param->var->name));
        }

        return $assigns;
    }
783127
public function setParams(array $params)
	{
		$this->path = [];
		$this->query = [];
		
		foreach($params as $k => $v)
		{
			if(is_integer($k))
			{
				if(array_key_exists($k, $this->pathParamNames))
				{
					$this->path[$this->pathParamNames[$k]] = $v;
					
					continue;
				}
				
				throw new \OutOfBoundsException(sprintf('No path param at position %u', $k));
			}
			
			if(in_array($k, $this->pathParamNames, true))
			{
				$this->path[$k] = $v;
				
				continue;
			}
			
			$this->query[$k] = $v;
		}
		
		return $this;
	}
172060
public function makeArrayFromParameters($class_method, $parameterValues)
	{
	    if (empty($class_method))
	        return array();
	    
	    // Get the class name and the method name
	    list($className, $methodName) = explode('::', $class_method);
	    if (empty($className) || empty($methodName))
	        return array();
	    
	    /**
	     * Build an array from the parameters
	     * Parameters' name will become keys
	     * Values will be parameters' values or default values
	     */ 
	    $parametersArray = array();
	    try 
	    {
	        // Gets the data of class/method from Reflection object
    	    $reflectionMethod = new \ReflectionMethod($className, $methodName);
    	    $parameters = $reflectionMethod->getParameters();
    	    
    	    // Loop on parameters
    	    foreach ($parameters as $keyParameter => $parameter)
    	    {
    	        // Check if we have a value given
    	        if (!empty($parameterValues[$keyParameter]))
    	            $parametersArray[$parameter->getName()] = $parameterValues[$keyParameter];
    	            else
    	                // No value given, check if parameter has an optional value
    	                if ($parameter->isOptional())
    	                    $parametersArray[$parameter->getName()] = $parameter->getDefaultValue();
    	                    else
    	                        // Else
    	                        $parametersArray[$parameter->getName()] = null;
    	    }
	    }
	    catch (\Exception $e)
	    {
	        // Class or method were not found
	        return array();
	    }
	    
	    return $parametersArray;
	}
713378
public function setParams(array $params)
    {
        foreach ($params as $param) {
            $this->config->setEndpoint(
                str_replace('{' . $param['placeholder'] . '}', $param['value'], $this->config->getConfig()['endpoint'])
            );
        }

        $this->parentParams = $params;
    }
1351147
public function setCookieParams(array $params)
    {
        $defaults = $this->getCookieParams();

        // Override defaults if present
        $params = array_merge($defaults, $params);

        return session_set_cookie_params(
            intval($params['lifetime']), 
            $params['path'], 
            $params['domain'], 
            (bool) $params['secure'], 
            (bool) $params['httponly']
        );
    }
160494
public function setClassTypes($classTypes)
    {
        if ($classTypes) {
            if (\is_string($classTypes)) {
                if (!\in_array($classTypes, $this->classTypes)) {
                    $this->classTypes[] = $classTypes;
                }
            } else {
                foreach ($classTypes as $classType) {
                    if (!\in_array($classType, $this->classTypes)) {
                        $this->classTypes[] = $classType;
                    }
                }
            }
        }
    }