Sets the parameters for the relation

@return void
10821
public function setParameters($parameters)
    {
		$this->parameters = [];
		
		if(!is_array($parameters)){
			$parameters = Helpers::convertStringToArray($parameters, '|');
		}
        
        foreach ($parameters as $parameter) {
            $this->parameters[] = Helpers::eliminateDupilcates($parameter, "\\");
        }
    }
296625
protected function setCommonApiParameters()
    {
        if (!empty($this->devKey)) {
            $this->setApiParameter('developerkey', $this->devKey);
        }

        $this->validator->validateApiKeys($this->apiKeys);
        $this->setApiParameter('apikey', implode(',', $this->apiKeys));

        return $this;
    }
217863
public function setParams()
    {
        if (Yii::$app->request->get('page') && Yii::$app->session->has('forum-search')) {
            $session = Yii::$app->session->get('forum-search');
            $this->query = $session['query'];
            $this->match = $session['match'];
            $this->author = $session['author'];
            $this->dateFrom = $session['dateFrom'];
            $this->dateFromStamp = $session['dateFromStamp'];
            $this->dateTo = $session['dateTo'];
            $this->dateToStamp = $session['dateToStamp'];
            $this->forums = $session['forums'];
            $this->type = $session['type'];
            $this->display = $session['display'];
            $this->nextPage = true;
        } else {
            $this->match = 'all';
            $this->type = 'posts';
            $this->display = 'topics';
            $this->nextPage = false;
        }
    }
152954
protected function setMultipleRelation($relationName, $value)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        /** @var ActiveQuery $relation */
        $relation = $owner->getRelation($relationName);
        $newRelations = [];
        if (!is_array($value)) {
            if (!empty($value)) {
                $value = [$value];
            } else {
                $value = [];
            }
        }
        foreach ($value as $entry) {
            if ($entry instanceof $relation->modelClass) {
                $newRelations[] = $entry;
            } else {
                // TODO handle this with one DB request to retrieve all models
                $newRelations[] = $this->processModelAsArray($entry, $relation, $relationName);
            }
        }
        $this->_newRelationValue[$relationName] = $newRelations;
        $owner->populateRelation($relationName, $newRelations);
    }
1252275
public function setParam($key, $value)
    {
        if (null === $this->params) {
            $this->params = array();
        }

        $this->params[$key] = $value;
    }
1084922
protected function setSingleRelation($relationName, $value)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        /** @var ActiveQuery $relation */
        $relation = $owner->getRelation($relationName);
        if (!($value instanceof $relation->modelClass)) {
            $value = $this->processModelAsArray($value, $relation, $relationName);
        }
        $this->_newRelationValue[$relationName] = $value;
        $owner->populateRelation($relationName, $value);
    }
68747
protected function setQuery()
    {
        $this->builder = $this->connection->createQueryBuilder();
        $this->builder->delete($this->connection->quoteIdentifier($this->model->table()));
    }
79888
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                switch (strtolower($paramname)) {
                    case self::CONTAINS_KEY:
                        $this->setText($parameters[$i]->getValue());
                        break;
                    case self::CASE_KEY:
                        $this->setCasesensitive($parameters[$i]->getValue());
                        break;
                    case self::WHITESPACE_KEY:
                        $this->setIgnoreWhitespace($parameters[$i]->getValue());
                        break;
                    default:
                        $this->setError("Invalid parameter " . $paramname);
                }
            } // for each param
        } // if params
    }
1272501
private function initRelations() {
    if ($this->relations == null) {
      $this->relations = [];
      $this->relations['all'] = array_values($this->getRelationDescriptions());
      $this->relations['parent'] = [];
      $this->relations['child'] = [];
      $this->relations['undefined'] = [];
      $this->relations['nm'] = [];

      foreach ($this->relations['all'] as $relation) {
        $hierarchyType = $relation->getHierarchyType();
        $hierarchyKey = $hierarchyType == 'parent' || $hierarchyType == 'child' ?
                $hierarchyType : 'undefined';
        $this->relations[$hierarchyKey][] = $relation;

        // also store relations to many to many objects, because
        // they would be invisible otherwise
        if ($relation instanceof RDBManyToManyRelationDescription) {
          $nmRelation = $relation->getThisEndRelation();
          $this->relations['nm'][$nmRelation->getOtherRole()] = $nmRelation;
        }
      }
    }
  }
913116
protected function setParams(array $params) {
		parent::setParams($params);
		if($this->autoinc===true){
			$this->notNull=false;
		}
	}
395741
public function setParam($key, $value): void
    {
        $key = (string)$key;

        if ((null === $value) && isset($this->params[$key])) {
            unset($this->params[$key]);
        } elseif (null !== $value) {
            $this->params[$key] = $value;
        }
    }
365725
public function buildRelations()
    {
        $this->command->buildMethod($this->model, 'belongsToMany', $this->toModel, $this->options);

        $foreignKey = $this->options['foreign_key'];
        $relatedKey = $this->options['related_key'];
        $this->options['foreign_key'] = $relatedKey;
        $this->options['related_key'] = $foreignKey;
        $this->options['relation'] = $this->model->getTable();

        $this->command->buildMethod($this->toModel, 'belongsToMany', $this->model, $this->options);
    }
614588
protected function setParameters()
	{
		$parameters = [];

		// Set output directory
		$parameters['-o'] = Config::get('spy.output', base_path('database/schema'));

		// Set database connection details
		$connections = Config::get('database.connections', []);
		$connection = ($this->argument('connection')) ?: Config::get('database.default');
		if(isset($connections[$connection]))
		{
			$this->info("Using '$connection' connection");

			$parameters['-host'] = $connections[$connection]['host'];
			$parameters['-db']   = $connections[$connection]['database'];
			$parameters['-u']    = $connections[$connection]['username'];
			$parameters['-p']    = $connections[$connection]['password'];
		}
		else
			$this->comment("Unknown connection '$connection'. Command will fail unless you provide DB credentials.");

		// Merge with user's parameters
		$parameters = array_merge($parameters, Config::get('spy.parameters', []));

		// Ask for missing mandatory parameters
		if( ! isset($parameters['-db']))
			$parameters['-db'] = $this->ask('Enter database name');

		if( ! isset($parameters['-u']))
			$parameters['-u'] = $this->ask('Enter database username');

		return $this->parameters = $parameters;
	}
700521
private function _setParams()
	{
		foreach ($_GET as $key => $value) {
			$this->_params[$key] = $this->_sanitize($value);
		}

		foreach ($_POST as $key => $value) {
			$_POST[$key] = $this->_sanitize($value);
		}

		$nbElements = count($this->_requestVars);
		if ($nbElements > 3) {
			$i = 2;
			while ($i < $nbElements and $i + 1 < $nbElements) {
				if (ctype_digit($this->_requestVars[$i])) {
					$i += 2;
					continue;
				}

				$this->_params[$this->_requestVars[$i]] = $this->_sanitize($this->_requestVars[$i + 1]);
				$i += 2;
			}
		}

		if ($nbElements > 2) {
			$i = 2;
			while ($i < $nbElements) {
				$this->_params[$i - 2] = $this->_sanitize($this->_requestVars[$i]);
				$i++;
			}
		}

		return $this;
	}
72739
protected function setConnectedRelationOptions()
	{
		$modelTable = $table = $this->model->getTable();
		$toModelTable = $table = $this->toModel->getTable();
		$foreignKey = $this->defaultOptions['foreign_key'];
		$primaryKey = $this->defaultOptions['primary_key'];
		
		if (! $this->db->isFieldExists($toModelTable, $foreignKey)) {
			$question = "Can't find field {$this->text['foreign_key']} in the table {$this->text['to_table']} as {$this->text['foreign_text']} of table {$this->text['table']}, choice one!";
			$this->options['foreign_key'] = $this->command->choice($question, $this->getFields($toModelTable));
		}

		if (! $this->db->isFieldExists($modelTable, $primaryKey)) {
			$question = "Can't find field {$this->text['primary_key']} in the table {$this->text['table']} as {$this->text['primary_text']} of table {$this->text['table']}, choice one!";
			$this->options['primary_key'] = $this->command->choice($question, $this->getFields($modelTable));
		}
	}
829309
protected function _setRelationForeignKeys($relationName)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        /** @var ActiveQuery $relation */
        $relation = $owner->getRelation($relationName);
        if ($relation->multiple === false && !empty($owner->{$relationName})) {
            Yii::debug("Setting foreign keys for {$relationName}", __METHOD__);
            foreach ($relation->link as $relatedAttribute => $modelAttribute) {
                if ($owner->{$modelAttribute} !== $owner->{$relationName}->{$relatedAttribute}) {
                    if ($owner->{$relationName}->isNewRecord) {
                        $owner->{$relationName}->save();
                    }
                    $owner->{$modelAttribute} = $owner->{$relationName}->{$relatedAttribute};
                }
            }
        }
    }
344555
protected function setQuery()
    {
        $this->builder = $this->connection->createQueryBuilder();
        $this->builder->select([]);
        $this->builder->from($this->connection->quoteIdentifier($this->model->table()));
    }