Sets the labelColor making sure it is not going to be encoded as a js string.

@param string $value

@throws \yii\base\InvalidConfigException
508697
public function setLabelColor($value)
    {
        if (!LabelColor::getIsValid($value)) {
            throw new InvalidConfigException('Unknown "labelColor" value');
        }
        $this->options['labelColor'] = new JsExpression($value);
    }
1292024
public function setValue($value) {
        if ($value !== null) {
            if ($this->isIncremental() && ! is_numeric($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non numeric value "%s" on incremental option "%s".',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isBoolean() && ! is_bool($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non boolean value "%s" on boolean option "%s".',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isSingle() && ! is_scalar($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non scalar value "%s" on option "%s" ' .
                    'that expects one scalar value.',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isMultiple() && ! is_array($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non array value "%s" on option "%s" ' .
                    'that expects multiple values.',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }
        }

        $this->value = $value;

        return $this;
    }
440339
public function setType($value)
    {
        $this->_validateNotNull('Type', $value);
        $this->_validateString('Type', $value);

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

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

        $this->_setModified('type');
    }
1187723
public function initFromString($value)
    {
        if ($color = $this->rgbaFromString($value)) {
            $this->setPixel($color[0], $color[1], $color[2], $color[3]);
        }
    }
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);
        }
    }
159515
public function setMatch($value)
    {
        switch (gettype($value)) {
            case 'array':
                $this->match = $value;
                break;
            case 'string':
                $this->match = [$value];
                break;
            case 'boolean':
                if ($value === false) {
                    $this->match = false;
                    break;
                }
                // Match could not be true.
            default:
                throw new InvalidConfigException("Invalid configuration. Wrong march type '{$value}'.");
        }
    }
502662
public function serialize($value) : string
    {
        if (!is_int($value)) {
            throw InvalidValueException::valueDoesNotMatchType($this, $value);
        }

        return (string) $value;
    }
461000
static function ensureValue($value)
    {
        if (!self::hasValue($value)) {
            throw new InvalidValueException(sprintf(
                'The value %s is not defined in enum class "%s", known values: %s',
                self::dumpValue($value),
                static::class,
                implode(', ', array_map([static::class, 'dumpValue'], self::getValues()))
            ));
        }
    }
655960
public function setNested($value)
    {
        $nested = StringHelper::booleanValue($value);
        if ($nested) {
            $this->flags = str_replace(' --style ' . $this->style, '', $this->flags);
            $this->flags .= ' --style nested';
            $this->style = 'nested';
        }
    }
1114866
public function setStringValue($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->string_value = $value;
    }
170843
protected function setIdAttr(Array $value)
    {
        if (!is_null($value)) {
            foreach ($value as $id) {
                if (!preg_match('/^[0-9]+$/D', $id)) {
                    throw new InvalidIdException('Invalid id: ' . $id);
                }
            }
        }

        $this->id = $value;
    }
99723
protected function validateType($value)
    {
        if (!is_array($value) && (!$this->allowFalse || false !== $value)) {
            $ex = new InvalidTypeException(sprintf(
                'Invalid type for path "%s". Expected array, but got %s',
                $this->getPath(),
                gettype($value)
            ));
            if ($hint = $this->getInfo()) {
                $ex->addHint($hint);
            }
            $ex->setPath($this->getPath());

            throw $ex;
        }
    }
514226
function setValue( $value )
    {
        $this->Value = $value;
        if ( $value instanceof ggWebservicesFault || $value instanceof eZSOAPFault )
        {
            $this->IsFault = true;
            $this->FaultCode = $value->faultCode();
            $this->FaultString = $value->faultString();
        }
        else
        {
            $this->IsFault = false;
        }
    }
1124827
protected function checkType($value)
    {
        if (is_int($value) !== true && is_string($value) !== true) {
            $msg = "The IntOrIdentifier Datatype only accepts to store identifier and integer values.";
            throw new InvalidArgumentException($msg);
        }
    }
1250224
public function setExpand($value)
    {
        $expand = StringHelper::booleanValue($value);
        if ($expand) {
            $this->flags = str_replace(' --style ' . $this->style, '', $this->flags);
            $this->flags .= ' --style expanded';
            $this->style = 'expanded';
        }
    }
957434
public function setLabel( $value )
	{
		if ( $value == $this->getLabel() ) { return; }

		$this->_values['label'] = (string) $value;
		$this->setModified();
	}
1286854
protected function validateColor($value)
    {
        $valid = false;

        if (mb_strlen($value) == 3) {
            $regexp = '/^[0-9a-f]{3}/ui';
        } elseif (mb_strlen($value) == 6) {
            $regexp = '/^[0-9a-f]{6}/ui';
        } else {
            $regexp = false;
        }

        if ($regexp !== false) {
            $valid = preg_match($regexp, $this->value) === 1;
        }

        return $valid;
    }