Sets the value.

@param \DateTimeImmutable|null $value The value.
173096
private function setValue(\DateTimeImmutable $value = null): void
    {
        if ($value === null) {
            $this->value = null;

            return;
        }

        $this->value = $value->setTime(0, 0, 0);
    }
598260
public function setSeverity($value)
    {
        $this->_validateNotNull('Severity', $value);
        $this->_validateInt('Severity', $value);

        if ($this->data['severity'] === $value) {
            return;
        }

        $this->data['severity'] = $value;

        $this->_setModified('severity');
    }
50164
public function setIsNew($value)
    {
        $value = ($value == true) ? 1 : 0;

        if ($this->data['is_new'] === $value) {
            return;
        }

        $this->data['is_new'] = $value;

        $this->_setModified('is_new');
    }
1114866
public function setStringValue($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->string_value = $value;
    }
99740
public function setValue($value)
	{
		if ($value instanceof \DateTime)
			$value = $value->format($this->format);
		parent::setValue($value);
	}
632348
protected function setValue($value)
    {
        switch ($value) {
            case self::MALE:
            case self::FEMALE:
                $this->value = $value;
                break;
            default:
                $this->value = self::UNKNOWN;
        }
    }
955949
public function setValue($value)
  {
    if (is_null($value)) {
      $this->value = null;
    } else if (is_bool($value)) {
      $this->value = $value;
    } else if (is_numeric($value)) {
      if ($value == 0) {
        $this->value = false;
      } else{
        $this->value = true;
      }
    } else if ($value == '') {
      $this->value = null;
    } else{
      throw new \Exception(sprintf('Valeur %s non appliquable a un composant de type Boolean', $value));
    }
  }
216533
public function setValue($value)
    {
        if ($value instanceof DateInterval) {
            $value = Utils::now()->add($value);
        }

        if ($value instanceof DateTimeInterface) {
            $value = $value->getTimestamp();
        }

        return parent::setValue($value);
    }
238018
public function setValue($value)
    {
        if (is_int($value) || is_float($value)) {
            $this->value = $value;
        } else {
            $msg = "The value of a Weight must be a valid integer or float value, '" . gettype($value) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1338860
public function setValue($value, $data = null)
    {
        $value = $this->preventHtmlParserError($value);
        return parent::setValue($value, $data);
    }
1295638
public function setReference($value)
    {
        $this->_validateNotNull('Reference', $value);
        $this->_validateString('Reference', $value);

        if ($this->data['reference'] === $value) {
            return;
        }

        $this->data['reference'] = $value;

        $this->_setModified('reference');
    }
607406
public function setFromTimestamp(\AgentSIB\Diadoc\Api\Proto\Timestamp $value = null)
    {
        $this->FromTimestamp = $value;
    }
553207
public function setValue($value) {
		if(is_string($value) && $this->getOption('trim'))
			$value = trim($value);

		$this->value = $value;
	}
688219
public function setMessage($value)
    {
        $this->_validateNotNull('Message', $value);
        $this->_validateString('Message', $value);

        if ($this->data['message'] === $value) {
            return;
        }

        $this->data['message'] = $value;

        $this->_setModified('message');
    }
1010576
public function setUpdatedAt($value)
    {
        if (! is_null($column = $this->getUpdatedAtColumn())) {
            $this->setAttribute($column, $value);
        }
    }
1007949
public function set($name, $value)
    {
        if (property_exists($this, $name)) {
            $this->$name = $value;

            return true;
        }

        return null;
    }
200688
public function setValue($value)
    {
        if ('checkbox' === $this->type && false === $value) {
            // uncheck
            $this->value = null;
        } elseif ('checkbox' === $this->type && true === $value) {
            // check
            $this->value = $this->options[0]['value'];
        } else {
            if (is_array($value)) {
                if (!$this->multiple) {
                    throw new \InvalidArgumentException(sprintf('The value for "%s" cannot be an array.', $this->name));
                }

                foreach ($value as $v) {
                    if (!$this->containsOption($v, $this->options)) {
                        throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $v, implode(', ', $this->availableOptionValues())));
                    }
                }
            } elseif (!$this->containsOption($value, $this->options)) {
                throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $value, implode(', ', $this->availableOptionValues())));
            }

            if ($this->multiple) {
                $value = (array) $value;
            }

            if (is_array($value)) {
                $this->value = $value;
            } else {
                parent::setValue($value);
            }
        }
    }