Set the default


@throws \InvalidArgumentException
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;
    }
1183006
protected function setValue($value)
    {
        if (!$this->validate($value)) {
            throw new \InvalidArgumentException(sprintf('%s is not a valid value', $value));
        }

        $this->value = $value;
    }
1166766
protected function setDefault()
    {
        if (strpos($this->input, '=')) {
            list($this->input, $this->default) = explode('=', $this->input);

            $this->modeArray[] = 'OPTIONAL';
        }

        return $this;
    }
241427
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_EXCEPTION_DEPTH        => 10,
                                   self::CFG_LOG_EXCEPTION_LOCATION => true];
            }
        }
474721
public function setDefault($value)
    {
        if (($value instanceof DateTime) === false) {
            throw new InvalidArgumentException(
                "invalid value provided for 'value'; ".
                "expecting an instance of DateTime"
            );
        }
        $this->defaultValue = $value;
        return $this;
    }
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
764887
protected function setClass()
    {
        if (!isset($this->rawOptions['class'])) {
            $this->rawOptions['class'] = static::DEFAULT_CLASS;
        }

        $this->class = $this->rawOptions['class'];
        unset($this->rawOptions['class']);
    }
1181829
private function setDefaults()
    {
        $this->options = [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_HEADER => true,
            CURLINFO_HEADER_OUT => true
        ];
    }
471696
private function setDefaultConfiguration(): void
    {
        $this->parameterBag->set('app.devmode', false);
        $this->parameterBag->set('container.dumper.inline_class_loader', true);

        $this->config->addPass($this->parameterBag);
    }
540067
public function setDefaultValue($value)
    {
        if (!is_array($value)) {
            throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.');
        }

        $this->defaultValue = $value;
    }
1097424
protected function setType(string $type) : void
    {
        if (empty($type)) {
            throw new InvalidArgumentException(__CLASS__ . ': Empty field type is not allowed');
        }

        if (! in_array($type, array_keys($this->defaultOptions))) {
            throw new InvalidArgumentException(__CLASS__ . ': Unsupported field type: ' . $type);
        }

        $this->type = $type;
    }
1150586
public function setDefaultValue($defaultValue): FieldInterface
    {
        if (!is_scalar($defaultValue) && !is_null($defaultValue)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'defaultValue'; ".
                "expecting either a scalar or null value"
            );
        }
        $this->defaultValue = $defaultValue;
        return $this;
    }
57381
public function setDefaultRenderer($name)
    {
        if (!\array_key_exists($name, $this->renderers)) {
            throw new \InvalidArgumentException(sprintf('Cannot set default exception renderer "%s". It does not exist.', $name));
        }

        $this->defaultRenderer = $name;
    }
1204472
public function setDefaultValue($defaultValue): FieldInterface
    {
        if (!is_array($defaultValue)) {
            throw new \InvalidArgumentException(
                "The default value for instances of ".
                __CLASS__." must be an array"
            );
        }

        $this->defaultValue = $defaultValue;
        return $this;
    }
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);
        }
    }
578207
private function setDefaultLocale($lang)
    {
        if ($lang === null) {
            $this->defaultLanguage = $this->languages[0];
            return;
        }

        if (!$this->hasLocale($lang)) {
            if (!is_string($lang)) {
                $lang = is_object($lang) ? get_class($lang) : gettype($lang);
            }

            throw new InvalidArgumentException(sprintf(
                'Unsupported default language; must be one of "%s", received "%s"',
                implode(', ', $this->availableLocales()),
                $lang
            ));
        }

        $this->defaultLanguage = $lang;
    }
108005
function _setDefaults()
    {
    	$this->options['db_type']	= 'mysql';
        $this->options['table']       = 'auth';
        $this->options['usernamecol'] = 'username';
        $this->options['passwordcol'] = 'password';
        $this->options['dsn']         = '';
        $this->options['db_fields']   = '';
        $this->options['cryptType']   = 'md5';
    }