public function setValue($value)
    {
        if (!$value) {
            if (!$this->getName()) {
                throw new \InvalidArgumentException('Value must not be empty.');
            }
            $value = self::filterValue($this->getName());
        }

        $this->value = (string) $value;

        return $this;
    }
public function setValue($value)
    {
        if (!$value) {
            if (!$this->getName()) {
                throw new \InvalidArgumentException('Value must not be empty.');
            }
            $value = self::filterValue($this->getName());
        }

        $this->value = (string) $value;

        return $this;
    }
public function setValue ( $ value ) { if ( ! $ value ) { if ( ! $ this -> getName ( ) ) { throw new \ InvalidArgumentException ( 'Value must not be empty.' ) ; } $ value = self :: filterValue ( $ this -> getName ( ) ) ; } $ this -> value = ( string ) $ value ; return $ this ; }
Set the value.

Used in form selects.

@param string $value

@return self
@throws \InvalidArgumentException if $value AND {@link name} are empty.
Set the value .