Set the value of the input.

@param string[] $value New value
@return $this
344427
public function setValue( $value ) {
		$this->value = $this->cleanUpValue( $value );
		// Deselect all options
		foreach ( $this->fields as $field ) {
			$field->getField()->setSelected( false );
		}
		// Select the requested ones
		foreach ( $this->value as $key ) {
			$this->fields[ $key ]->getField()->setSelected( true );
		}
		return $this;
	}
1203661
public function setValue($value)
	{
		// set default
		if( $value === "" )
		{
			$value = $this->value;
		}

		if( $this->type === "boolean" )
		{
			$value = is_bool($value) ? $value : in_array($value, ['y', 'yes', 'on', '1']);
		}
		else if( $this->type === "number" )
		{
			if( ! is_numeric($value) )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " must be a number");
			}
			$value = (float) $value;
			if( $this->required && $value === 0 )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " is required");
			}
		}
		else if( $this->type === "enum" )
		{
			if( ! in_array($value, $this->enum, true) )
			{
				$variant = "'" . implode("' or '", $this->enum) . "'";
				throw new \InvalidArgumentException($this->getTheTitle() . " must be equal " . $variant);
			}
		}
		else
		{
			$value = trim($value);
			if( $this->required && ! strlen($value) )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " is required");
			}
		}

		if( $this->type_of )
		{
			$value = call_user_func($this->type_of, $value);
			if( $value === false && $this->type !== "boolean" )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " value is invalid");
			}
		}

		$this->value = $value;
		return $this;
	}
825885
public function setValue($value, $index = null)
    {
        if ($index === null) {
            $this->value = Arr::cast($value);
        }
        else {
            $this->value[$index] = $value;
        }
        return $this;
    }
608885
public function setValue($value)
    {
        $this->checked = (!is_array($value)) ? [$value] : $value;
        if ((count($this->checked) > 0) && ($this->hasChildren())) {
            foreach ($this->childNodes as $child) {
                if ($child instanceof Input\Checkbox) {
                    if (in_array($child->getValue(), $this->checked)) {
                        $child->check();
                    } else {
                        $child->uncheck();
                    }
                }
            }
        }
        return $this;
    }
815073
public function set($value = null) 
    {
        if (is_null($value)) {
            $value = array();
        }
        
        if (!is_array($value)) {
            $value = func_get_args();
        }
        
        $this->__construct($value);
        
        return $this;
    }
586931
protected function setValue($value)
    {
        if (!isset($this->value) || null === $this->value) {
            $this->value = $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;
	}
906164
public function setValue($value)
    {
        if (!isset($value)) {
            unset($this->value);
            return $this;
        }
        $this->value = (string) $value;
        return $this;
    }
478870
public function setValue($value)
    {
        $this->_value = $value;
        $this->getInput()->setValue($value);
        return $this;
    }
5154
public function set($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $innerName => $innerValue) {
                $this->replace($innerName, $this->formatValue($innerValue));
            }
        } else {
            $this->replace($name, $this->formatValue($value));
        }

        // return is for chaining
        return $this;
    }
1205585
public function setValue($value) {
		if($value instanceof Value) {
			$value = $value->getRawValue();
		}
		foreach($this->inputs as $inflector) {
			$value = $inflector($value);
		}
		$this->value = $value;
	}
1350111
public function setDefaultValue($value) : self
    {
        $this->default_value = $value;
        // If valid input was entered already, check if this value is different.
        if ($this->is_valid) {
            $this->is_changed = ($this->default_value == $this->user_value);
        }
        return $this;
    }
843874
public function set($name, $value): self
    {
        if (!\is_array($value)) {
            $value = ['value' => (string)$value];
        }

        parent::set($name, \array_replace($this->defaults, $value));

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

		if ( ! is_array($value) && ! $value instanceof \ArrayAccess)
		{
			$valueArray = [$value];
		}
		else
		{
			$valueArray = $value;
		}

		// Loop through the contents and make any checked that need to be
		foreach ($this->getContents() as $checkbox)
		{
			$checkboxValue = $checkbox->getValue();
			if (in_array($checkboxValue, $valueArray))
			{
				$checkbox->setChecked(true);
			}
			else
			{
				$checkbox->setChecked(false);
			}
		}

		return $this;
	}
834355
function add($value) {
        if(!\in_array($value, $this->data, true)) {
            $this->data[] = $value;
        }
        
        return $this;
    }
1028737
public function setValue($value)
    {
        $this->checked = $value;
        if ((null !== $this->checked) && ($this->hasChildren())) {
            foreach ($this->childNodes as $child) {
                if ($child instanceof Input\Radio) {
                    if ($child->getValue() == $this->checked) {
                        $child->check();
                    } else {
                        $child->uncheck();
                    }
                }
            }
        }
        return $this;
    }
633259
public function setValue($value)
    {
        $this->value = [];

        $token = ' ,;';
        $values = strtok($value, $token);

        while ($values !== false) {
            $this->value[] = $values;
            $values = strtok($token);
        }
    }