Add a specified value

@param mixed $value
@param bool $force_null
497680
protected function addValue($value, $force_null = false)
        {
            if (is_array($value)) {
                foreach ($value as $single_value) {
                    $this->addValue($single_value);
                }
            } else {
                if ($value !== null || $force_null) {
                    $this->values[] = $this->query->getDatabaseValue($value);
                }
            }
        }
285552
public void put(Boolean value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			this.compiledStatement.bindLong(compiledStatementBindIndex++, (value == true ? 1 : 0));
		}
	}
79054
public function addValue($value, $index = null)
    {
        if ($this->value === null) {
            $this->value = [];
        }

        if ($index === null) {
            $this->value[] = $value;
        }
        else {
            $this->value[$index] = $value;
        }

        return $this;
    }
1076718
public function set($field, $value = null , $insert = true, $update = true)
    {

        if (is_array($field)) {
            foreach ($field as $key=>$val) {
                $this->set($key, $val, $insert, $update);
            }
        }

        $this->add($field, '', 'auto');
        if ($insert)
            $this->field($field)->insertValue($value);

        if ($update)
            $this->field($field)->updateValue($value);

    }
1288851
public function addSpan($value)
    {
        if ($this->span === null) {
            $this->span = new \Protobuf\ScalarCollection();
        }

        $this->span->add($value);
    }
1132563
public function addParam($value, $key = null)
    {
        if ($key !== null && ! is_numeric($key)) {
            $this->params[$key] = $value;
        } else {
            $this->params[] = $value;
        }
    }
597710
public static function forceAndReturn($value, $type, $isNullable=false)
    {
        static::force($value, $type, $isNullable);
        return $value;
    }
610074
public function addChild($name, $value = null, $namespace = null, $allowNull = true)
    {
        if (!$allowNull && $value === null) {
            return null;
        }
        if (!empty($value)) {
            $value = preg_replace(self::PATTERN_INVALID_CHARS, '', $value);
        }
        if ($value !== Shopgate_Model_AbstractExport::SET_EMPTY) {
            return parent::addChild($name, $value, $namespace);
        }
        $child = parent::addChild($name, '', $namespace);
        $child->addAttribute('forceEmpty', '1');

        return $child;
    }
701849
public function add ($key , $value) {
        if (!$this->beforeAdd()) {
            return false;
        }
        if (!$this->getConnection ()->getClient ()->zadd ($this->name , $value , $key)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        $this->afterAdd();
        return true;
    }
636505
private function addIntoAllowedValues($value)
    {
        if (empty($this->getType())) {
            return false;
        }

        if (in_array(
                $value,
                $this->allowedValues
        )) {
            return false;
        }

        switch ($this->getType()) {
            case 'int' :
                $value = intval($value);

                $this->allowedValues[] = $value;

                return true;

            case 'float' :
                $value = floatval($value);

                $this->allowedValues[] = $value;

                return true;
            case 'string' :
                $value = (string)$value;

                $this->allowedValues[] = $value;

                return true;
            default:

                return false;
        }
    }
606676
public function load($value = null)
    {
        if (is_array($value)) {
            $this->loadFromArray($value);
        } elseif (is_string($value) && file_exists($value)){
            $this->loadFromFile($value);
        }
    }
1009799
protected function addViolation($value, Constraint $constraint)
    {
        $this->context->addViolation(
            $constraint->message,
            [
                '{{ id_field }}' => $constraint->getIdField(),
                '{{ value }}'    => $value
            ],
            $value
        );
    }
503643
public void addValue(int... value) {
        /* no-op if disabled */
        if (!enabled.get())
            return;

        for (int v : value) {
            try {
                getCurrentBucket().data.addValue(v);
            } catch (Exception e) {
                logger.error("Failed to add value: " + v, e);
            }
        }
    }
1094699
public static function force($value, $type, $isNullable=false)
    {
        if (!static::is($value, $type, $isNullable)) {
            $should = is_array($type) ? implode(',', $type) : $type;

            /** @var TypeException $e */
            $e = static::exception("The passed value is a :type but has to be $should", $value);
            throw $e;
        }
    }
327944
public void updateIf (T value)
    {
        if (value == null || !value.equals(_value)) {
            update(value);
        }
    }
114089
public function addValue($value)
        {
            if (is_array($value)) {
                foreach ($value as $single_value) {
                    $this->addValue($single_value);
                }
            } else {
                if ($value !== null) {
                    $this->values[] = $this->getDatabaseValue($value);
                }
            }
        }
1178928
public void addValue(
                    final Object value
                    )
    {
        if (value == null) {
            setNullContained( true );
        } else {
            _values.add( String.valueOf( value ) );
        }
    }