Hackzilla\PasswordGenerator\Model\Option\IntegerOption::setValue PHP Метод

setValue() публичный Метод

Set option integer value.
public setValue ( integer $value )
$value integer
    public function setValue($value)
    {
        if (!is_integer($value)) {
            throw new InvalidArgumentException('Integer required');
        }
        if ($this->minRange > $value || $this->maxRange < $value) {
            throw new InvalidArgumentException('Invalid Value');
        }
        parent::setValue($value);
    }

Usage Example

 public function testAddIntegerType()
 {
     $option = new IntegerOption();
     $option->setValue(123);
     $type = new OptionType();
     $this->invokeMethod($type, 'addIntegerType', [$this->formBuilder(), 'key', $option]);
 }
All Usage Examples Of Hackzilla\PasswordGenerator\Model\Option\IntegerOption::setValue