Set config file type

@param  string $fileType
@return self
@throws InvalidArgumentException if unsupported file type
@access protected
12471
protected function setFileType(/*# string */ $fileType)
    {
        // validate file type
        $class = __NAMESPACE__ . '\\' . ucfirst($fileType) . 'Loader';
        if (!class_exists($class, true)) {
            throw new InvalidArgumentException(
                Message::get(Message::CONFIG_SUFFIX_UNKNOWN, $fileType),
                Message::CONFIG_SUFFIX_UNKNOWN
            );
        }
        $this->file_type = $fileType;
        $this->loader_class = $class;

        return $this;
    }
1313969
public function setType(string $type): self
    {
        if (!\in_array($type, self::COLUMN_TYPES, true)) {
            throw new \InvalidArgumentException('Not supported column type '. $type);
        }

        $this->type = $type;

        return $this;
    }
515350
public function setDefault($default)
    {
        switch ($this->type) {
            case self::TYPE_STRING:
                if (!\is_string($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a string');
                }

                break;
            case self::TYPE_NUMBER:
                if (!\is_numeric($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a number');
                }

                break;
            case self::TYPE_INTEGER:
                if (!\is_numeric($default) || (int) $default != $default) {
                    throw new \InvalidArgumentException('Default parameter is not an integer');
                }

                break;
            case self::TYPE_DATE:
                if (!$default instanceof \DateTimeImmutable) {
                    throw new \InvalidArgumentException('Default parameter is not a dateTime object');
                }

                break;
            case self::TYPE_BOOLEAN:
                if (!\is_bool($default)) {
                    throw new \InvalidArgumentException('Default parameter is not a boolean');
                }

                break;
            case self::TYPE_FILE:
                throw new \InvalidArgumentException('A default value cannot be set for a file');

                break;
        }

        $this->default = $default;
    }
705554
public function setType($type)
    {
        if (!in_array($type,[$this::WORK, $this::HOME, $this::MOBILE, $this::FAX]))
        {
            throw new InvalidArgumentException("Type is not a valid type. You must use one of the constants in the PhoneNumber class as the type.");
        }
        $this->type = $type;
    }
373311
public function setFiles(array $files)
    {
        foreach ($files as $file) {
            if (is_file($file)) {
                $file = new SplFileInfo($file, $file, $file);
            }

            if (!($file instanceof SplFileInfo)) {
                throw new InvalidArgumentException("File $file not exists.");
            }

            $this->files[$file->getRealPath()] = $file;
        }

        return $this;
    }
585140
public function setType($type)
    {
        if (! in_array($type, self::$types, true)) {
            throw new InvalidArgumentException(sprintf(
                '"%s" is not a valid type! Valid types: %s',
                $type,
                implode(', ', self::$types)
            ));
        }

        $this->type = $type;

        return $this;
    }
1331143
public function setType($type)
    {
        if ($type != PdfConverter::URL && $type != PdfConverter::HTML) {
            throw new \Exception('Wrong type of file descriptor');
        }

        $this->type = $type;

        return $this;
    }
10804
public function setFromType($fromType)
    {
        $allowedValues = $this->getFromTypeAllowableValues();
        if (!in_array($fromType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'fromType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['fromType'] = $fromType;

        return $this;
    }
929948
public function setContentType($contentType)
    {
        $allowedValues = $this->getContentTypeAllowableValues();
        if (!is_null($contentType) && !in_array($contentType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'contentType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['contentType'] = $contentType;

        return $this;
    }
1075408
public function setMimetype($type)
    {
        if ($type === null || $type === false) {
            $this->mimetype = null;

            return $this;
        }

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

        $this->mimetype = $type;

        return $this;
    }
73269
public function setDoctype($doctype)
    {
        if (!array_key_exists($doctype, $this->doctypes)) {
            throw new \InvalidArgumentException(sprintf('Invalid Doctype "%s"', $doctype));
        }

        $this->doctype = $doctype;
    }
1354190
public function set($requiredType)
    {
        if (!in_array($requiredType, $this->validTypes)) {
            throw new \InvalidArgumentException("{$requiredType} is not a supported number type");
        }
        if ($requiredType == self::TYPE_GMP && !extension_loaded('gmp')) {
            throw new \InvalidArgumentException('GMP not supported');
        }

        $this->requiredType = $requiredType;

        return $this;
    }
548224
public function setType($type)
    {
        if (is_string($type)) {
            $type = ColumnType::createType($type);
        } elseif (!$type instanceof AbstractType) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' setType() accepts only AbstractType or string.');
        }
        $this->properties['type'] = $type;

        return $this;
    }
563903
public function setConfigType(\VinceT\AdminConfigurationBundle\Entity\ConfigType $configType)
    {
        $this->configType = $configType;

        return $this;
    }
1087610
public function setAsset($url, $fileType)
    {
        $this->assetUrl = $url;
        $this->assetFileType = $fileType;
        return $this;
    }
81245
public function setFile(string $filePath): self
    {
        IOExpect::isFile($filePath);
        IOExpect::isReadable($filePath);

        $this->file = $filePath;

        return $this;
    }
1154289
public function setConfigFile($configFile = '')
    {
        if (!is_readable($configFile)) {
            $this->activeConfig = [];

            throw ParserException::forFileUnreadable($configFile);
        }

        $this->configFile = $configFile;
        if (!$this->parseConfigFile()) {
            throw InvalidConfigException::forEmptyConfig($configFile);
        }

        return $this;
    }