create condition  for object
@param array $values
@return string
496500
protected function setValuesList(array $values) {
        $parseValues =  [];
        foreach ($values as $value) {
            $parseValues[] = $this->getDriverEscaper()->quote($this->getDriverEscaper()->escape($value));
        }
        return '(' . implode(' ' . $this->getDriverEscaper()->getFieldsSeparator() . ' ' ,  $parseValues) . ')';
    }
547008
public static function build(array $values)
    {
        $result = new static;

        foreach ($values as $field => $value) {
            /** @var $className TypeInterface */
            $result->$field = $value;
        }

        return $result;
    }
443957
public function createCompositeObject($values)
    {
        switch ($this->phpType) {
            case 'array':
                return $values;
            case 'object':
                return (object)$values;
        }

        return \Yii::createObject($this->phpType, [$values]);
    }
1085203
public function setValues(array $values = array())
    {
        foreach ($values as $k => $v) {
            $this->set($k, $v);
        }

        return $this;
    }
51136
public function values( array $values )
	{
		// do nothing if we get nothing
		if ( empty( $values ) )
		{
			return $this;
		}
		
		// check if the the passed array is a collection.
		// because we want to be able to insert bulk values.
		if ( !\CCArr::is_collection( $values ) )
		{
			$values = array( $values );
		}
		
		// because we could recive the arrays in diffrent order 
		// we have to sort them by their key.
		foreach( $values as $key => $value )
		{
			ksort( $value ); $values[$key] = $value;
		}
		
		// merge the new values with the existing ones.
		$this->values = array_merge( $this->values, $values ); 
		
		// return self so we can continue running the next function
		return $this;
	}
1082825
public function setAllValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
464960
public static function notIn($values)
    {
        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        return new Rules\NotIn(is_array($values) ? $values : func_get_args());
    }
119429
public function from_array(array $values)
	{
		foreach($values as $property => $value)
		{
			if (array_key_exists($property, static::properties()) and ! in_array($property, static::primary_key()))
			{
				$this->_data[$property] = $value;
			}
			elseif (array_key_exists($property, static::relations()) and is_array($value))
			{
				$rel = static::relations($property);
				if ( ! isset($this->_data_relations[$property]))
				{
					$this->_data_relations[$property] = $rel->singular ? null : array();
				}
				foreach($value as $id => $data)
				{
					if (is_array($data))
					{
						if (array_key_exists($id, $this->_data_relations[$property]))
						{
							foreach($data as $field => $contents)
							{
								if ($rel->singular)
								{
									$this->_data_relations[$property]->{$field} = $contents;
								}
								else
								{
									$this->_data_relations[$property][$id]->{$field} = $contents;
								}
							}
						}
						else
						{
							if ($rel->singular)
							{
								$this->_data_relations[$property] = call_user_func(static::relations($property)->model_to.'::forge', $data);
							}
							else
							{
								$this->_data_relations[$property][] = call_user_func(static::relations($property)->model_to.'::forge', $data);
							}
						}
					}
				}
			}
			elseif (property_exists($this, '_eav') and ! empty(static::$_eav))
			{
				$this->_set_eav($property, $value);
			}
			else
			{
				$this->_custom_data[$property] = $value;
			}
		}

		return $this;
	}
1097465
protected function forceStringValues(array $values)
    {
        foreach ($values as $key => $value) {
            $values[$key] = (string) $value;
        }

        return $values;
    }
838447
public function createAndSave(array $values)
    {
        $entity = $this->createEntity($values);
        $this->insertOne($entity);

        return $entity;
    }
613891
protected static function filterConstant(array $values)
    {
        if (isset($values[1]) && in_array($values[1], self::VALID_CONSTANTS)) {
            $values[1] = constant($values[1]);
        }
        return $values[1];
    }
1090215
final public function setData(array $values): Model
    {
        if (!is_array($this->data)) {
            $this->data = $values;
        } else {
            $this->data = array_merge($this->data, $values);
        }

        return $this;
    }
841752
public function insertGetId(array $values): string
    {
        $stmt = $this->set($values)->prepare();
        $stmt->execute();

        return $this->pdo->lastInsertId();
    }
924001
public function filter($values)
    {
        if (is_array($values)) {
            foreach ($values as $key => $value) {
                $values[$key] = $this->filterValue($value);
            }
        }

        return $values;
    }
1364581
public function Where($condition, $values) {
        $this->setWhere($condition);
        $this->addBindValues($values);
        return $this;
    }
1204008
public function values($values)
    {
        if(!$values instanceof DatabaseQuerySelect)
        {
            if (!$this->columns && !is_numeric(key($values))) {
                $this->columns(array_keys($values));
            }

            $this->values[] = array_values($values);
        }
        else $this->values = $values;

        return $this;
    }
754816
private function doInsert(array $values) {
        $db       = $this->db();
        $mapping  = $this->dao()->getMapping();
        $table    = $mapping['table'];
        $idColumn = $mapping['identity']['column'];
        $id       = null;
        if  (isset($values[$idColumn])) $id = $values[$idColumn];
        else unset($values[$idColumn]);

        // translate column values
        foreach ($values as &$value) {
            $value = $db->escapeLiteral($value);
        }; unset($value);

        // create SQL statement
        $sql = 'insert into '.$table.' ('.join(', ', \array_keys($values)).')
                   values ('.join(', ', $values).')';

        // execute SQL statement
        if ($id) {
            $db->execute($sql);
        }
        else if ($db->supportsInsertReturn()) {
            $id = $db->query($sql.' returning '.$idColumn)->fetchInt();
        }
        else {
            $id = $db->execute($sql)->lastInsertId();
        }
        return $id;
    }