Set maximum number.

@param int $value

@return $this
168006
public function setMax(int $value)
    {
        $this->max = $value;

        $this->addValidationRule('max:' . $value);

        return $this;
    }
718147
public function setLimit($limit)
    {
        if ($limit < 1 || !is_int($limit)) {
            throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);
        }
        $this->limit = $limit;

        return $this;
    }
1193405
public function setBirthdateM($value)
    {
        if ($value === null) {
            $this->parameters['birthdateM'] = null;
        } else {
            validators\Number::validate($value, 1, 12, 'Invalid birthdateM');
            $this->parameters['birthdateM'] = min(12, max(1, (int)$value));
        }
        return $this;
    }
1373385
public static function isLengthGte($value, $max)
    {
        is_array($max) && $max = $max[0];
        return self::isLength($value, $max);
    }
4699
public function addAddition($value)
    {
        $this->data->amount->subtotals->addition += $this->convertAmount($value);

        return $this;
    }
411143
public function setLimit($limit)
    {
        $this->limit = (int)$limit;

        if ($this->total > 0 && $this->limit > 0) {
            $this->setPages(ceil($this->total / $limit));
        }

        return $this;
    }
452487
public function setRange($value)
    {
        if (is_array($value) || $value instanceof \Traversable) {
            $this->range = $value;
        } else {
            throw new InvalidArgumentException('Range param must be instance of an array or Traversable');
        }

        return $this;
    }
847525
public function limit($value)
    {
        $property = $this->unions ? 'unionLimit' : 'limit';

        if ($value >= 0) {
            $this->{$property} = $value;
        }

        return $this;
    }
478870
public function setValue($value)
    {
        $this->_value = $value;
        $this->getInput()->setValue($value);
        return $this;
    }
1108442
public function initFromInteger($value)
    {
        $this->a = ($value >> 24) & 0xFF;
        $this->r = ($value >> 16) & 0xFF;
        $this->g = ($value >> 8) & 0xFF;
        $this->b = $value & 0xFF;

        return $this;
    }
1298564
public function setMaxCol($value)
    {
        if ($value != null) {
            $this->_params['max-col'] = $value;
        } else {
            unset($this->_params['max-col']);
        }
        return $this;
    }
1162019
public function setValue($value) {
		if (!$this->isPrimitive($value)) {
			throw new \InvalidArgumentException('Use setValue() only for primitives and PhpConstant, anyway use setExpression() instead.');
		}
		$this->value = $value;
		$this->hasValue = true;

		return $this;
	}
1337774
public function setAddition($value)
    {
        if (!isset($this->data->amount->subtotals)) {
            $this->data->amount->subtotals = new stdClass();
        }
        $this->data->amount->subtotals->addition = (float) $value;

        return $this;
    }
1250842
public function setSharedMaxAge(int $value)
    {
        $this->setPublic();
        $this->headers->addCacheControlDirective('s-maxage', $value);

        return $this;
    }
666603
public function setAddition($value)
    {
        $this->data->amount->subtotals->addition = $this->convertAmount($value);

        return $this;
    }
996673
public function setMax($max)
    {
        if (is_numeric($max) || Format::isVariableRef($max)) {
            $this->max = $max;
        } else {
            $msg = "'Max must be a numeric value or a variableRef, '" . gettype($max) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
410932
public function setMaxFileSize(int $value)
    {
        $this->maxFileSize = $value;

        $this->addValidationRule('max:' . $this->maxFileSize);

        return $this;
    }