Fills params with rest of entity columns

@param array $params
439178
protected function fill(&$params)
    {
        if (is_null($this->model->new_value)) {
            return false;
        }
        foreach ($params as $index => $value) {
            if (isset($params[$index])) {
                continue;
            }
            $params[$index] = array_get($this->model->new_value, $index);
        }
        return $params;
    }
1228194
public function resetRecords(array $params = []) {
		$defaults = [
			'page' => 1,
			'limit' => $this->_config['limit'],
			'fields' => [],
			'order' => [$this->_table->getAlias() . '.' . $this->_table->getPrimaryKey() => 'ASC'],
			'conditions' => $this->_config['scope'],
			'validate' => $this->_config['validate'],
		];
		if (!empty($this->_config['fields'])) {
			foreach ((array)$this->_config['fields'] as $field) {
				if (!$this->_table->hasField($field)) {
					throw new RuntimeException('Table does not have field ' . $field);
				}
			}
			$defaults['fields'] = array_merge([$this->_table->getAlias() . '.' . $this->_table->getPrimaryKey()], $this->_config['fields']);
		} else {
			$defaults['fields'] = [$this->_table->getAlias() . '.' . $this->_table->getPrimaryKey()];
			if ($this->_table->getDisplayField() !== $this->_table->getPrimaryKey()) {
				$defaults['fields'][] = $this->_table->getAlias() . '.' . $this->_table->getDisplayField();
			}
		}

		$updateFields = [];
		if (!$this->_config['updateTimestamp']) {
			$fields = ['modified', 'updated'];
			foreach ($fields as $field) {
				if ($this->_table->getSchema()->getColumn($field)) {
					$defaults['fields'][] = $field;
					$updateFields[] = $field;
					break;
				}
			}
		}

		$params += $defaults;

		$conditions = $params['conditions'];
		$count = $this->_table->find('count', compact('conditions'));
		$max = (int)ini_get('max_execution_time');
		if ($max) {
			set_time_limit(max($max, $count));
		}

		$modified = 0;
		while (($records = $this->_table->find('all', $params)->toArray())) {
			foreach ($records as $record) {
				$fields = (array)$params['fields'];
				if ($this->getConfig('updateFields')) {
					$fields = (array)$this->getConfig('updateFields');
					if (!$this->_config['updateTimestamp']) {
						$fields = array_merge($updateFields, $fields);
					}
				}
				if ($fields && !in_array($this->_table->getPrimaryKey(), $fields)) {
					$fields[] = $this->_table->getPrimaryKey();
				}

				if ($this->_config['callback']) {
					if (is_callable($this->_config['callback'])) {
						$parameters = [$record, &$fields];
						$record = call_user_func_array($this->_config['callback'], $parameters);
					} else {
						$record = $this->_table->{$this->_config['callback']}($record, $fields);
					}
					if (!$record) {
						continue;
					}
				}

				$validate = $params['validate'];
				$res = $this->_table->save($record, compact('validate', 'fields'));
				if (!$res) {
					throw new RuntimeException(print_r($record->getErrors(), true));
				}
				$modified++;
			}
			$params['page']++;
			if ($this->_config['timeout']) {
				sleep((int)$this->_config['timeout']);
			}
		}
		return $modified;
	}
441975
protected function buildParams(array $params)
	{
		return array_merge(array(
			$this->database,
			$this->uid(),
			$this->password
		), $params);
	}
395202
protected function cleanParams(array $params)
    {
        $values = [];
        foreach ($params as $name => $details) {
            $this->cleanValueFrom($name, $details['value'], $values);
        }

        return $values;
    }
10321
public function bind($params = null)
    {

        if (is_array($params)) {
            foreach ($params as $k => $v) {
                $this->bindParam($k, $v);
            }
        }

        return $this;
    }
937023
public function addParameters(array $params)
    {
        if (!is_array($params)) {
            throw new \InvalidArgumentException('$params has to be an array');
        }
        $this->parameters = array_merge($this->parameters, $params);
    }
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);
    }
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;
	}
76098
function setColumn($index, $params)
	{
		if (isset($this->columns[$index])) $this->columns[$index] = array_merge($this->columns[$index], $params);
		else $this->columns[$index] = $params;
	}
665364
public function setUrlParams(array $params) {
		foreach ($params as $param => $value) {
			$this->setUrlParam($param, $value);
		}
		
		return $this;
	}
110412
public function insert($params)
    {
        if (is_array($params)) {
            $count_rows = count($params['columns']);
            $increment = 1;
            foreach ($params['columns'] as $keys => $value) {
                for ($i = 1; $i <= $count_rows; $i++) {
                    $data[$keys] = $value;
                }
            }
            foreach ($data as $keys => $values) {
                if ($increment == $count_rows) {
                    $columns[] = "{$keys} = '{$values}'";
                } else {
                    $columns[] = "{$keys} = '{$values}'";
                }
                $increment++;
            }
            $columns = implode(' , ', $columns);
            $query = "INSERT INTO `{$params['table']}`SET {$columns}";
            if (isset($params['debug']) and strtolower($params['debug']) === 'on') {
                var_dump($query);
            }

            return $query;
        } else {
            return false;
        }
    }
1250060
public function addParams(array $addParams)
    {
        $parts = $this->split($this->url);

        parse_str($parts['query'], $params);
        $params = array_merge($params, $addParams);
        $parts['query'] = http_build_query($params);

        return $this->join($parts);
    }
793914
public final function setRecord ($params)
    {
        foreach ($params as $key => $param) {
            if (! in_array($key, $this->getColumn())) {
                unset($params->{$key});
            }
        }

        $this->record = $params;
    }
253618
public function setSiteParameters($params)
    {
        foreach ($params as $key => $param) {
            $this->setSiteParameter($key, $param);
        }

        return $this;
    }
943927
public static function prepare($params = [])
    {
        $positions = array_combine(array_keys($params), array_fill(0, count($params), 0));
        $data = [];

        do {
            $data[] = self::getByIndexes($params, $positions);
        } while (self::updateIndexesToNextIteration($params, $positions));

        return $data;
    }
798721
public function mergeParams($params)
    {
        foreach ($params as $k => $v) {
            if (is_int($k)) {
                $this->positionParams[] = $v;
            } else {
                $this->params[$k] = $v;
            }
        }

        return $this;
    }
1285604
public function setSqlParameters(array $params)
    {
        $this->params = $params;

        $this->stmt = null;
        $this->rowCount = null;
    }