Set default value.

@param mixed $value

@return self
177665
public function setDefaultValue($value): Property
    {
        $this->hasDefault = true;
        $this->defaultValue = $value;

        return $this;
    }
289278
public function setValue($value) {
		Argument::i()->test(1, 'scalar', 'array', 'null');
		
		if(!is_array($value)) {
			$value = func_get_args();
		}
		
		$this->value = $value;
			
		return $this;
	}
646878
public function set(string $key, $value): self
    {
        Arr::set($this->data, $key, $value, true);
        return $this;
    }
610989
public function setDefaultValue($name, $value)
    {
        if (!$this->hasParameter($name)) {
            $this->setParameter($name, $value);
        }

        return $this;
    }
678252
public function value($value = null)
    {
        if (is_null($value)) {
            return empty($this->value) ? ($this->getDefault() ?? []) : $this->value;
        }

        $this->value = $value;

        return $this;
    }
878419
public function setValue( $value )
    {
        // Only set cell value for single cells
        if (!str_contains( $this->cells, ':' )) {
            $this->sheet->setCellValue( $this->cells, $value );
        }

        return $this;
    }
738121
public function setValue(?string $value) : Setting
    {

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

        return $this;
    }
1191451
public function setValue($value)
    {
        if ($value == $this->getAttribute('value')) {
            $this->check();
        } else {
            $this->uncheck();
        }
        return $this;
    }
472955
public function forgetValue($value)
    {
        $key = array_search($value, $this->values);

        if ($key !== false) {
            unset($this->values[$key]);
        }

        return $this;
    }
598220
public function setValue($value)
	{
		$this->value = $value;

		if ( ! is_array($value) )
		{
			$value = [$value];
		}

		$this->recursiveAssignValue($value, $this->getContents());

		return $this;
	}
901752
public function setValue($value)
    {
        if ($value instanceof \DateTime) {
            $this->value = $value->getTimestamp();
        } else {
            $this->value = $value;
        }

        return $this;
    }
124760
public function setDefault($argument, $value)
    {
        Arr::set($this->defaults, $argument, $value);

        return $this;
    }
849952
public function setValue($value)
    {
        $this->value = ($value) ? self::TRUE : self::FALSE;

        return $this;
    }
1106241
public function setValue($value) : self
    {
        if (is_bool($value)) {
            $value = ($value == true) ? '1' : '0';
        }

        $this->field->addAttribute('value', !is_null($value) ? (string) $value : '');

        return $this;
    }
180132
public function setValue($value) {
		if ($value instanceof \ArrayObject)
			$this->value = $value->getArrayCopy();
		elseif (is_object($value))
			$this->value = get_object_vars($value);
		elseif (is_array($value))
			$this->value = $value;
		else
			throw new \InvalidArgumentException("Method 'setValue' expected an object or array value");
		
		return $this;
	}
1164945
protected function setValue($value)
    {
        if (is_string($value)) {
            $value = trim($value);
            if ($value !== "") {
                $this->value = $value;
            } else {
                throw new \InvalidArgumentException("Invalid value for argument 'value' given.");
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($value) . "' for argument 'value' given. String expected."
            );
        }

        return $this;
    }
83370
public function setCoreDefaultUsername($value)
    {
        $this->setFieldName('default_username');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }