protected function addSetting($name, $value, $group = null, $flag = ISetting::NORMAL, $cachable = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('A setting must have a valid name.');
        }

        if (null === $group) {
            $group = $this->getDefaultSettingGroupName();
        }

        $setting = new Setting($name, $value, $group, $flag);

        $this->result->addSetting($setting, $cachable);

        return $this;
    }
protected function addSetting($name, $value, $group = null, $flag = ISetting::NORMAL, $cachable = false)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('A setting must have a valid name.');
        }

        if (null === $group) {
            $group = $this->getDefaultSettingGroupName();
        }

        $setting = new Setting($name, $value, $group, $flag);

        $this->result->addSetting($setting, $cachable);

        return $this;
    }
protected function addSetting ( $ name , $ value , $ group = null , $ flag = ISetting :: NORMAL , $ cachable = false ) { if ( empty ( $ name ) ) { throw new \ InvalidArgumentException ( 'A setting must have a valid name.' ) ; } if ( null === $ group ) { $ group = $ this -> getDefaultSettingGroupName ( ) ; } $ setting = new Setting ( $ name , $ value , $ group , $ flag ) ; $ this -> result -> addSetting ( $ setting , $ cachable ) ; return $ this ; }
Adds the given value under the given key to the settings
of the result. The setting may have a group name to more
easily separate them on export. If no group name is specified
the check's default setting group name is used as the default.

@param string $name key for that setting
@param mixed $value usually a string value
@param string $group name of group this setting belongs to
@param int $flag type of the setting (normal or sensitive)
@param boolean $cachable whether that setting should also be stored in a cache. Default is false (NOT cached!).

@return Check this instance for fluent API support

@throws \InvalidArgumentException if no valid setting key was given
Adds the given value under the given key to the settings of the result . The setting may have a group name to more easily separate them on export . If no group name is specified the check s default setting group name is used as the default .