Set the value.

@param string $value Optional URL, pass `null` for "undefined".
549842
public function setValue(string $value = null) : Element
    {
        if ($value && !preg_match("@^(https?|ftp)://@", $value)) {
            $value = "http://$value";
        }
        return parent::setValue($value);
    }
250500
public function set_value($value) {

        if (!empty($value) && !$this->field->isChecked()) {

            if (!$this->running_javascript()) {
                $this->field->check();
                return;
            }

            // Check it if it should be checked and it is not.
            $this->field->click();

            // Trigger the onchange event as triggered when 'checking' the checkbox.
            $this->trigger_on_change();

        } else if (empty($value) && $this->field->isChecked()) {

            if (!$this->running_javascript()) {
                $this->field->uncheck();
                return;
            }

            // Uncheck if it is checked and shouldn't.
            $this->field->click();

            // Trigger the onchange event as triggered when 'checking' the checkbox.
            $this->trigger_on_change();
        }
    }
1087128
public function setValue($value)
    {
        $matches = $this->parseKeywordText($value);
        if(isset($matches['keywords']))
        {
            if(isset($matches['keywords'][2]))
            {
                $this->database = $matches['keywords'][0];
                $this->table = $matches['keywords'][1];
                $this->field = $matches['keywords'][2];
            }
            else if(isset($matches['keywords'][1]))
            {
                $this->database = null;
                $this->table = $matches['keywords'][0];
                $this->field = $matches['keywords'][1];
            }
            else if(isset($matches['keywords'][0]))
            {
                $this->database = null;
                $this->table = null;
                $this->field = $matches['keywords'][0];
            }
            $this->alias = $matches['alias'];
        }
    }
434612
public function setCheck($value)
    {
        $check = StringHelper::booleanValue($value);
        $this->check = $check;
        if ($check) {
            $this->flags .= ' --check ';
        } else {
            $this->flags = str_replace(' --check ', '', $this->flags);
        }
    }
958977
public function setValue($value)
    {
        $this->item->set($this->field->getColName(), $this->field->mmAttribute->widgetToValue($value, null));
    }
373432
public function set_value($value) {

        $editorid = $this->field->getAttribute('id');
        if ($this->running_javascript()) {
            $value = addslashes($value);
            $js = '
var editor = Y.one(document.getElementById("'.$editorid.'editable"));
if (editor) {
    editor.setHTML("' . $value . '");
}
editor = Y.one(document.getElementById("'.$editorid.'"));
editor.set("value", "' . $value . '");
';
            $this->session->executeScript($js);
        } else {
            parent::set_value($value);
        }
    }
248944
public function setOgrn(\AgentSIB\Diadoc\Api\Proto\StringValue $value = null)
    {
        $this->Ogrn = $value;
    }
906231
public function set($value = null)
	{
		$ts = sfDateTimeToolkit::getTS($value);
		
		$this->ts = $ts;
		if ($this->init === null)
		{
			$this->init = $ts;
		}
		
		return $this;
	}
620328
public function setValue($value)
    {
        if (!is_string($value) || (is_object($value) && !method_exists($value, "__toString"))) {
            throw new InvalidArgumentException(sprintf(
                "Invalid argument given to %s, expected a string, %s given",
                __METHOD__,
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        $value = (string) $value;

        if (null !== $regex = $this->getValidationRegex()) {
            if (! preg_match($regex, $value)) {
                throw new InvalidArgumentException(sprintf(
                    "The given value '%s' doesn't match the validation regular expression: %s",
                    $value,
                    $regex
                ));
            }
        }

        $this->value = $value;

        return $this;
    }
1216590
public function set(string $key, $value = null): void
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            $this[$slug] = $value;
            return;
        }

        $storage = $value;

        foreach (array_reverse($slug) as $id => $key) {
            if ($id === count($slug) - 1) {
                break;
            }

            $aux[$key] = $storage;

            $storage = $aux;
            unset($aux);
        }

        $this[$key] = $storage;
    }
352424
public function set($variable, $value = null)
    {
        $this->variables[$variable] = array(
            'safe' => $this->htmlEncode($value),
            'unsafe' => $value
        );

        return $this;
    }
1046313
public function setValue($value)
    {
        // special case for boolean values
        if (is_bool($value)) {
            if ($value) {
                $this->_value = "true";
            } else {
                $this->_value = "false";
            }
        } else {
            $this->_value = (string) $value;
        }
    }
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');
    }
710650
public function setValue($value)
    {
        if (is_string($value) === true) {
            $this->value = $value;
        } else {
            $msg = "The 'value' argument must be a string, '" . gettype($value) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
347815
public function set($key, $value = null)
    {
        DotArr::set($this->data, $key, $value);
    }
656390
public function setValue(string $value = null) : Element
    {
        if (!is_null($value)) {
            $tmp = preg_replace('/[^\d]/', '', $value);
            if (strlen($tmp)) {
                $value = $tmp;
                if ($value{0} != '0') {
                    $value = "0$value";
                }
            }
        }
        return parent::setValue($value);
    }
1114866
public function setStringValue($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->string_value = $value;
    }