public function get(string $settingsField = null, $default = null)
    {
        // if no settings field was given return all settings
        if (is_null($settingsField)) {
            return $this->settings;
        }

        $setting = $this->settings;

        foreach (explode('.', $settingsField) as $field) {
            if (is_array($setting) && array_key_exists($field, $setting)) {
                $setting = &$setting[$field];
            } else {
                return $default;
            }
        }

        return $setting;
    }
public function get(string $settingsField = null, $default = null)
    {
        // if no settings field was given return all settings
        if (is_null($settingsField)) {
            return $this->settings;
        }

        $setting = $this->settings;

        foreach (explode('.', $settingsField) as $field) {
            if (is_array($setting) && array_key_exists($field, $setting)) {
                $setting = &$setting[$field];
            } else {
                return $default;
            }
        }

        return $setting;
    }
public function get ( string $ settingsField = null , $ default = null ) { // if no settings field was given return all settings if ( is_null ( $ settingsField ) ) { return $ this -> settings ; } $ setting = $ this -> settings ; foreach ( explode ( '.' , $ settingsField ) as $ field ) { if ( is_array ( $ setting ) && array_key_exists ( $ field , $ setting ) ) { $ setting = & $ setting [ $ field ] ; } else { return $ default ; } } return $ setting ; }
Returns the given settings field if set or the default value

Note: If no settings field is given all settings are returned.

@api
@since 0.1.0
@param string $settingsField The settings field to retrieve.
@param mixed  $default       The default value to use.
@return mixed
Returns the given settings field if set or the default value