public function setValue($value)
    {
        if (($value instanceof ValueGenerator) !== true) {
            $value = new ValueGenerator($value);
        }

        if ($value->isValidConstantType() !== true) {
            throw new InvalidArgumentException('Constant value is not valid (' . gettype($value->getValue()) . ' type given).');
        }

        $this->value = $value;

        return $this;
    }
public function setValue($value)
    {
        if (($value instanceof ValueGenerator) !== true) {
            $value = new ValueGenerator($value);
        }

        if ($value->isValidConstantType() !== true) {
            throw new InvalidArgumentException('Constant value is not valid (' . gettype($value->getValue()) . ' type given).');
        }

        $this->value = $value;

        return $this;
    }
public function setValue ( $ value ) { if ( ( $ value instanceof ValueGenerator ) !== true ) { $ value = new ValueGenerator ( $ value ) ; } if ( $ value -> isValidConstantType ( ) !== true ) { throw new InvalidArgumentException ( 'Constant value is not valid (' . gettype ( $ value -> getValue ( ) ) . ' type given).' ) ; } $ this -> value = $ value ; return $ this ; }
Set the value for the constant.

@param mixed $value The value for the constant.
@return \Wingu\OctopusCore\CodeGenerator\PHP\OOP\ClassConstantGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the value is not valid.
Set the value for the constant .