Sets "to" type for the filter treated as ranged.

@param string $rangedToType AbstractRangeOrSingleFilter::RANGED_TO_TYPE_*

@return static
@throws InvalidArgumentException On invalid argument
328088
public function setRangedToType($rangedToType)
    {
        $allowedTypes = [self::RANGED_TO_TYPE_LESS, self::RANGED_TO_TYPE_LESS_OR_EQUAL];

        if (!is_string($rangedToType) || !in_array($rangedToType, $allowedTypes)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid "ranged to type" argument. Allowed types: [%s].', implode(', ', $allowedTypes)
            ));
        }

        $this->rangedToType = $rangedToType;

        return $this;
    }
996442
public function setEncodingType($type)
    {
        if ($type === false || $type === self::RFC1738 || $type === self::RFC3986) {
            $this->encoding = $type;
        } else {
            throw new \InvalidArgumentException('Invalid URL encoding type');
        }

        return $this;
    }
925137
protected function setValues($type)
    {
        switch ($type) {
            case static::CLIENT:
                $this->values = ['cs', 'cr'];
                break;
            case static::SERVER:
                $this->values = ['sr', 'ss'];
                break;
            default:
                throw new \InvalidArgumentException('$type must be TYPE_CLIENT or TYPE_SERVER');
        }
    }
1057626
public function setInputType($type)
    {
        if (empty($type)) {
            $this->inputType = null;
            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Property input type must be a string'
            );
        }

        $this->inputType = $type;

        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;
    }
139565
public function setValue($value)
    {
        if (null !== $value) {
            if (!$this->validateValue($value)) {
                throw new \InvalidArgumentException(\sprintf(
                    'Binding invalid value (type "%s") into filter "%s" (%s)',
                    \is_object($value) ? \get_class($value) : \gettype($value),
                    $this->name,
                    \get_class($this)
                ));
            }

            $this->value = $value;
            $this->updateBound();
        }

        return $this;
    }
226000
public function setPadType($padType)
    {
        if (!\in_array($padType, [STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH], true)) {
            throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
        }

        $this->padType = $padType;

        return $this;
    }
828235
public function setType($type)
    {
        if (is_string($type)) {
            if (in_array($type, [
                self::TYPE_ALL, self::TYPE_PRINT, self::TYPE_SCREEN, self::TYPE_SPEECH,
                self::TYPE_AURAL, self::TYPE_BRAILLE, self::TYPE_EMBOSSED, self::TYPE_HANDHELD,
                self::TYPE_PROJECTION, self::TYPE_TTY, self::TYPE_TV
            ])) {
                $this->type = $type;

                return $this;
            } else {
                // Invalid type values have to be handled as "not all"
                // @see: http://dev.w3.org/csswg/mediaqueries-4/#error-handling
                $this->type = self::TYPE_ALL;
                $this->setIsNot(true);
                $this->setIsOnly(false);
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($type). "' for argument 'type' given."
            );
        }
    }
224229
public function setType($type)
    {
        if (!in_array($type, array(
            self::TYPE_CORE,
            self::TYPE_DISTRIBUTION,
            self::TYPE_CAMPAIGN,
            self::TYPE_MILESTONE,
            self::TYPE_ACTIVITY,
            self::TYPE_OPERATION,
            self::TYPE_CHANNEL,
            self::TYPE_LOCATION,
            self::TYPE_SECURITY,
            self::TYPE_REPORT,
            self::TYPE_REPORT_ANALYTICS,
            self::TYPE_REPORT_BUDGET,
            self::TYPE_REPORT_SALES,
            self::TYPE_HOOK,
            self::TYPE_SYMFONY,
        ))) {
            throw new \InvalidArgumentException("Invalid bundle type.");
        }
        $this->type = $type;

        return $this;
    }
1087438
public function setValue($type)
    {
        if (is_numeric($type) && in_array($type, self::TYPE)) {
            $this->type = (int) $type;
        } elseif (is_string($type) && array_key_exists(strtoupper($type), self::TYPE)) {
            $this->type = self::TYPE[strtoupper($type)];
        } elseif (is_string($type) && array_key_exists(strtoupper($type), self::SHORT_NAME)) {
            $this->type = self::SHORT_NAME[strtoupper($type)];
        } else {
            throw new InvalidArgumentException(sprintf('The value "%s" is not a valid AceType.', $type));
        }

        return $this;
    }
551635
public function setNodeType($nodeType)
    {
        if (is_string($nodeType)) {
            $nodeType = $this->nodeTypeManager->getNodeType($nodeType);
        }

        if (!$nodeType instanceof NodeType) {
            throw new \InvalidArgumentException('nodeType needs to be of type string or NodeType', 1452100970);
        }

        $this->nodeType = $nodeType;
    }
1060028
public function setBillingType($billingType)
    {
        $allowed_values = $this->getBillingTypeAllowableValues();
        if (!in_array($billingType, $allowed_values)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'billingType', must be one of '%s'",
                    implode("', '", $allowed_values)
                )
            );
        }
        $this->container['billingType'] = $billingType;

        return $this;
    }
983723
public function setType($type)
    {
        if (is_string($type) === true) {
            $this->type = $type;
        } else {
            $msg = "The 'type' argument must be a non-empty string representing a mime-type, '" . gettype($type) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
780562
public function setAdaptive($adaptive)
    {
        if (is_bool($adaptive)) {
            $this->adaptive = $adaptive;
        } else {
            $msg = "The adaptive argument must be a boolean, '" . gettype($adaptive) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
41521
public function setExportHandler($type)
    {
        if (
            $type === self::EXPORT_NORMAL ||
            $type === self::EXPORT_ARRAY ||
            $type === self::EXPORT_SKIP ||
            is_callable($type)
        ) {
            $this->exportHandler = $type;
            return $this;
        }

        throw new InvalidArgumentException(
            "invalid value provided for 'type'; ".
            "expecting a callable, or one of the following contstants: ".
            "sndsgd\Field::EXPORT_NORMAL, sndsgd\Field::EXPORT_ARRAY, or ".
            "sndsgd\Field::EXPORT_SKIP"
        );
    }
1186831
public function setType($type = null)
    {
        if (is_array($type)) {
            $detected = 0;
            foreach ($type as $value) {
                if (is_int($value)) {
                    $detected += $value;
                } elseif (in_array($value, $this->constants)) {
                    $detected += array_search($value, $this->constants);
                }
            }

            $type = $detected;
        } elseif (is_string($type) && in_array($type, $this->constants)) {
            $type = array_search($type, $this->constants);
        }

        if (!is_int($type) || ($type < 0) || ($type > self::TYPE_ALL)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Unknown type value "%s" (%s)',
                $type,
                gettype($type)
            ));
        }

        $this->options['type'] = $type;
        return $this;
    }
1215099
public function setReturnType($type) {

        if ( !in_array($type, self::$rpcvalues) ) throw new InvalidArgumentException("Invalid RpcMethod return type");

        $this->signatures[$this->current_signature]["RETURNTYPE"] = self::$rpcvalues[$type];

        return $this;

    }