public function getValue($key, $defaultValue, $type)
    {
        $this->loadSettingsIfNotDoneYet();

        if (array_key_exists($key, $this->settingsValues)) {
            settype($this->settingsValues[$key], $type);
            return $this->settingsValues[$key];
        }

        return $defaultValue;
    }
public function getValue($key, $defaultValue, $type)
    {
        $this->loadSettingsIfNotDoneYet();

        if (array_key_exists($key, $this->settingsValues)) {
            settype($this->settingsValues[$key], $type);
            return $this->settingsValues[$key];
        }

        return $defaultValue;
    }
public function getValue ( $ key , $ defaultValue , $ type ) { $ this -> loadSettingsIfNotDoneYet ( ) ; if ( array_key_exists ( $ key , $ this -> settingsValues ) ) { settype ( $ this -> settingsValues [ $ key ] , $ type ) ; return $ this -> settingsValues [ $ key ] ; } return $ defaultValue ; }
Returns the current value for a setting. If no value is stored, the default value
is be returned.

@param string $key  The name / key of a setting
@param mixed $defaultValue Default value that will be used in case no value for this setting exists yet
@param string $type The PHP internal type the value of the setting should have, see FieldConfig::TYPE_*
constants. Only an actual value of the setting will be converted to the given type, the
default value will not be converted.
@return mixed
Returns the current value for a setting . If no value is stored the default value is be returned .