Retrieve an array of all of the settings

If there are no settings, return an empty array.
516627
public function settingsGetAll()
    {
        global $CFG;
        $name = $this->ENTITY_NAME;
        $retval = $this->ltiParameter($name."_settings", false);

        // Null means in the session - false means not in the session
        if ( $retval === null || ( is_string($retval) && strlen($retval) < 1 ) ) {
            $retval = array();
        } else if ( strlen($retval) > 0 ) {
            try {
                $retval = json_decode($retval, true);
            } catch(Exception $e) {
                $retval = array();
            }
        }
        // echo("Session $name: "); var_dump($retval);
        if ( is_array($retval) ) return $retval;

        $row = $this->launch->pdox->rowDie("SELECT settings FROM {$CFG->dbprefix}{$this->TABLE_NAME}
            WHERE {$name}_id = :ID",
            array(":ID" => $this->id));

        if ( $row === false ) return array();
        $json = $row['settings'];
        if ( $json === null ) return array();
        try {
            $retval = json_decode($json, true);
        } catch(Exception $e) {
            $retval = array();
        }

        // Put in session for quicker retrieval
        $this->ltiParameterUpdate($name."_settings", json_encode($retval));
        // echo("<hr>From DB\n");var_dump($retval);
        return $retval;
    }
1015473
def get_settings(self):
    '''
    '''
    config = self._load_config_user()
    if self.name in config:
        return config[self.name]
1068457
public static function initStatic(array $settings): array
    {
        $settings += static::$settings ?? [];
        foreach ($settings as $name => &$value) {
            $propertyName = null;
            if (property_exists(static::class, $name)) {
                $propertyName = $name;
                unset($settings[$name]);
            }

            if ($propertyName === null
                && property_exists(static::class, NameConverter::snakeCaseToCamelCase($name))) {
                $propertyName = NameConverter::snakeCaseToCamelCase($name);
                unset($settings[$name]);
            }

            $methodName = 'set' . $propertyName;
            if (is_callable([static::class, $methodName])) {
                static::{$methodName}($value);
                continue;
            }

            if (array_key_exists($propertyName, get_class_vars(static::class))) {
                static::${$propertyName} = $value;
            }
        }

        unset($value);

        return $settings;
    }
81191
def settings(self):
        
        if not self._settings:
            data = self.query(Settings.key)
            self._settings = Settings(self, data)
        return self._settings
188956
def extract_props(self, settings):
        '''
        
        '''

        props = {}

        for param in self.call_parameters:
            if param in settings:
                props[param] = settings[param]
            else:
                props[param] = None

        return props
607347
def get_setting(self, name):
        notfound = object()
        " "
        value = getattr(config, name, notfound)
        if name.endswith('_WHITELISTED_DOMAINS'):
            if value:
                return value.split(',')
            else:
                return []

        if value is notfound:
            value = getattr(settings, name)
        # Force text on URL named settings that are instance of Promise
        if name.endswith('_URL'):
            if isinstance(value, Promise):
                value = force_text(value)
            value = resolve_url(value)
        return value
1056900
public com.google.api.ads.adwords.axis.v201809.cm.Setting[] getSettings() {
        return settings;
    }
939257
def _marshal_settings(self):
        
        result = {}
        for key in dir(settings):
            if any(map(key.startswith, ['FLOW_', 'RESOLWE_', 'CELERY_'])):
                result[key] = getattr(settings, key)
        return result
612258
private function getFluteSettings(): array
    {
        /** @var SettingsProviderInterface $settingsProvider */
        $settingsProvider = $this->getContainer()->get(SettingsProviderInterface::class);
        $settings         = $settingsProvider->get(FluteSettings::class);

        return $settings;
    }
1329814
def _collect_settings(self, apps):
        
        contents = {}
        if apps:
            for app in apps:
                if app not in settings.INSTALLED_APPS:
                    raise CommandError("Application '{0}' not in settings.INSTALLED_APPS".format(app))
        else:
            apps = settings.INSTALLED_APPS
        for app in apps:
            module = import_module(app)
            for module_dir in module.__path__:
                json_file = os.path.abspath(os.path.join(module_dir, self.json_file))
                if os.path.isfile(json_file):
                    with open(json_file, 'r') as fp:
                        contents[app] = json.load(fp)
        return contents
1009413
def get_value(self):
        
        try:
            self.raw_value
        except (AttributeError, KeyError) as err:
            self._reraise_if_required(err)
            default_value = self.default_value
            if self.transform_default:
                return self.transform(default_value)
            return default_value
        else:
            # If setting is defined, load values of all subsettings.
            value = {}
            for key, subsetting in self.settings.items():
                value[key] = subsetting.get_value()
            return value
23603
public static function settings(): array
    {
        $filename = static::filename();
        if (!static::checkFileExist($filename)) {
            throw new \Exception($filename . ' dosnt exists. Please create this file.');
        }
        $settings = YamlManipulator::getFileContents($filename);
        if (!isset($settings['settings'])) {
            throw new \Exception('The settigns files is not valid, all parameters must be under settings array.');
        }
        return (array)$settings['settings'];
    }
302695
public static function getRestartSettings()
    {
        $envArgs = explode('|', (string) getenv(self::RESTART_SETTINGS));

        if (count($envArgs) !== 6
            || (!self::$inRestart && php_ini_loaded_file() !== $envArgs[0])) {
            return;
        }

        return array(
            'tmpIni' => $envArgs[0],
            'scannedInis' => (bool) $envArgs[1],
            'scanDir' => '*' === $envArgs[2] ? false : $envArgs[2],
            'phprc' => '*' === $envArgs[3] ? false : $envArgs[3],
            'inis' => explode(PATH_SEPARATOR, $envArgs[4]),
            'skipped' => $envArgs[5],
        );
    }
1332108
def get_values():
    

    # First load a mapping between config name and default value
    default_initial = ((name, options[0])
                       for name, options in settings.CONFIG.items())
    # Then update the mapping with actually values from the backend
    initial = dict(default_initial, **dict(config._backend.mget(settings.CONFIG)))

    return initial
1272840
def available_settings(self):
        """"""
        available = {}
        if not self.status_data:
            return available

        for (key, val) in self.status_data.get('avail', {}).items():
            available[key] = []
            for subval in val:
                try:
                    subval = float(subval)
                except ValueError:
                    subval = subval

                if val in ('on', 'off'):
                    subval = (subval == 'on')

                available[key].append(subval)

        return available
701883
def get_empty_config():
    
    empty_color_config = get_empty_color_config()
    result = Config(
        examples_dir=None,
        custom_dir=None,
        color_config=empty_color_config,
        use_color=None,
        pager_cmd=None,
        editor_cmd=None,
        squeeze=None,
        subs=None
    )
    return result
526027
def all(self):
        
        if not preferences_settings.ENABLE_CACHE:
            return self.load_from_db()

        preferences = self.registry.preferences()

        # first we hit the cache once for all existing preferences
        a = self.many_from_cache(preferences)
        if len(a) == len(preferences):
            return a  # avoid database hit if not necessary

        # then we fill those that miss, but exist in the database
        # (just hit the database for all of them, filtering is complicated, and
        # in most cases you'd need to grab the majority of them anyway)
        a.update(self.load_from_db(cache=True))
        return a