Sets the model type of the class this schema is referring to.

@param int $modelType The model type, one of the MODELTYPE_* constants.
@throws \InvalidArgumentException
763521
public function setModelType($modelType)
    {
        if ($modelType < self::MODELTYPE_ENTITY || $modelType > self::MODELTYPE_VALUEOBJECT) {
            throw new \InvalidArgumentException('"' . $modelType . '" is an invalid model type.', 1212519195);
        }
        $this->modelType = $modelType;
    }
1184425
public function setType($type = 'string')
    {
        if (!\in_array($type, $this->validTypes, true)) {
            throw new InvalidQueryParameterTypeException($type, $this->validTypes);
        }

        $this->type = $type;
    }
558448
public function setSingleType($singleType)
    {
        $allowedTypes = [
            self::SINGLE_TYPE_EXACT,
            self::SINGLE_TYPE_GREATER,
            self::SINGLE_TYPE_GREATER_OR_EQUAL,
            self::SINGLE_TYPE_LESS,
            self::SINGLE_TYPE_LESS_OR_EQUAL,
        ];

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

        $this->singleType = $singleType;

        return $this;
    }
966847
public function setType(?string $type): void
    {
        if (!in_array($type, static::getTypes(), true)) {
            throw new \InvalidArgumentException('Wrong zone type supplied.');
        }

        $this->type = $type;
    }
1249746
public void setModelType(ModelType type) {
		this.modelType = type;

		if (type != ModelType.AUTO) {
			this.type = type.getJsName();
		}
		else {
			this.type = null;
		}
	}
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;
    }
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);
        }
    }
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;
    }
1140810
public function setType($type)
    {
        if (is_string($type) && in_array($type, self::$types)) {
            $this->type = $type;
        } else {
            throw new InvalidArgumentException;
        }
    }
78908
public function setType($type)
    {
        if ($type instanceof PagSeguroPaymentMethodType) {
            $this->type = $type;
        } else {
            $this->type = new PagSeguroPaymentMethodType($type);
        }
    }
1133201
public function setSingleTableType() {
    $modelClass = get_class($this);
    $classType = property_exists($modelClass, 'singleTableType') ? $modelClass::$singleTableType : null;
    if ($classType !== null) {
      if ($this->hasGetMutator(static::$singleTableTypeField)) {
        $this->{static::$singleTableTypeField} = $this->mutateAttribute(static::$singleTableTypeField, $classType);
      } else {
        $this->{static::$singleTableTypeField} = $classType;
      }
    } else {
      // We'd like to be able to declare non-leaf classes in the hierarchy as abstract so they can't be instantiated and saved.
      // However, Eloquent expects to instantiate classes at various points. Therefore throw an exception if we try to save
      // and instance that doesn't have a type.
      throw new SingleTableInheritanceException('Cannot save Single table inheritance model without declaring static property $singleTableType.');
    }
  }
1115012
public function setType($type = '') {
        if (!\in_array($type, self::$allowed_input_types, true)) {
            throw new InvalidArgumentException('Unsupported column input type. Possible are: ' . implode(', ', self::$allowed_input_types));
        }

        $this->selected_input_type = $type;

        // Update some params based on type
        switch ($this->selected_input_type) {
            case 'checkbox': case 'radio': case 'delete':
                $this->setWidth('1%');
                $this->disableNewlines();
                $this->enableCenterAlign();
            break;
        }

        return $this;
    }
263785
public function type(string $readModelType)
    {
        if (!is_subclass_of($readModelType, IReadModel::class, true)) {
            throw InvalidArgumentException::format(
                'Invalid class supplied to read model mapper definition: expecting instance of %s, %s given',
                IReadModel::class, $readModelType
            );
        }

        $this->readDefinition->type($readModelType);
        /** @var string|IReadModel|TypedObject $readModelType */
        $this->class = $readModelType::definition();
    }
445110
public function setType($type)
    {
        $this->type = $type;

        switch ($this->type) {
            case 'jdepend-chart':
            case 'jdepend-xml':
            case 'overview-pyramid':
            case 'phpunit-xml':
            case 'summary-xml':
                break;

            default:
                throw new BuildException('Logger "' . $this->type . '" not implemented');
        }
    }
942538
public function setSqlType($sqlType)
    {
        if (!is_string($sqlType)) {
            throw new InvalidArgumentException(
                'SQL Type must be a string.'
            );
        }

        switch (strtoupper($sqlType)) {
            case 'TEXT':
                $sqlType = 'TEXT';
                break;

            case 'TINY':
            case 'TINYTEXT':
                $sqlType = 'TINYTEXT';
                break;

            case 'MEDIUM':
            case 'MEDIUMTEXT':
                $sqlType = 'MEDIUMTEXT';
                break;

            case 'LONG':
            case 'LONGTEXT':
                $sqlType = 'LONGTEXT';
                break;

            default:
                throw new InvalidArgumentException(
                    'SQL Type must be one of TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.'
                );
        }

        $this->sqlType = $sqlType;

        return $this;
    }
1010350
public function setInheritanceType($type) : void
    {
        if (! $this->isInheritanceType($type)) {
            throw MappingException::invalidInheritanceType($this->className, $type);
        }

        $this->inheritanceType = $type;
    }
879081
public function setPropertyType($type)
    {
        if (empty($type)) {
            $this->propertyType = null;
            return $this;
        }

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

        $this->propertyType = $type;

        return $this;
    }