Returns the setting if set

@return mixed null if not set, else an array of set settings
346963
public function get_setting() {
        $result = $this->config_read($this->name);
        if (is_null($result)) {
            return NULL;
        }
        if (!$this->load_choices()) {
            return NULL;
        }
        $result = str_pad($result, count($this->choices), '0');
        $result = preg_split('//', $result, -1, PREG_SPLIT_NO_EMPTY);
        $setting = array();
        foreach ($this->choices as $key=>$unused) {
            $value = array_shift($result);
            if ($value) {
                $setting[$key] = 1;
            }
        }
        return $setting;
    }
484681
public function get_setting() {
        // Here, we need to decode any ascii-encoded IDNs back to their native, utf-8 representation.
        $data = $this->config_read($this->name);
        if (function_exists('idn_to_utf8') && !is_null($data)) {
            $data = $this->ace_decode($data);
        }
        return $data;
    }
4437
def get_setting(key, *default):
    """"""
    if default:
        return get_settings().get(key, default[0])
    else:
        return get_settings()[key]
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
1197458
public function get($key = null, $default = null, $set = false)
    {
        if (isset($this->_settings[$key])) {
            return $this->_settings[$key];
        }
        if ($set) {
            $this->set($key, $default);
        }
        return $default;
    }
913193
public function setting(string $name)
    {
        if (isset($this->settings[$name])) {
            return $this->settings[$name];
        }

        return null;
    }
424522
public function getSetting($settingName)
    {
        $value = null;

        /* @var ShopSetting $setting */
        $setting = $this->shopSettingsRepository->findOneBy([
            'name' => $settingName
        ]);

        if ($setting) {
            $value = $setting->getValue();
        }

        return $value;
    }
777777
public function missingSettings()
    {
        $missing = [];
        foreach($this->recommendedSettings() as $plugin => $settings) {
            foreach($settings as $setting) {
                /* Get value for the setting */
                $value = $_ENV[$setting] ?? null;

                if(is_null($value)) $missing[$plugin][] = $setting;
            }
        }
        return $missing;
    }
76817
public function getTransient(string $setting = '')
    {
        $data = $this->get();
        $settings = $data['transient'];

        if ('' !== $setting) {
            if (isset($settings[$setting])) {
                return $settings[$setting];
            }

            if (false !== \strpos($setting, '.')) {
                // convert dot notation to nested arrays
                $keys = \explode('.', $setting);
                foreach ($keys as $key) {
                    if (isset($settings[$key])) {
                        $settings = $settings[$key];
                    } else {
                        return null;
                    }
                }

                return $settings;
            }

            return null;
        }

        return $settings;
    }
1322257
public function get(string $key)
    {
        $hash =  self::findFirst([
            'conditions' => "{$this->settingsKey} = ?0 and key = ?1",
            'bind' => [$this->getSettingsKey(), $key]
        ]);

        if ($hash) {
            return $hash->value;
        }

        return null;
    }
1051492
public static function getSetting($key)
    {
        $setting = Settings::all()->where('settingsKey', $key)->first();
        if($setting) {
            return $setting->value;
        }
        return;
    }
243246
public function settings($passed = null)
    {
        if (is_array($passed)) {
            return $this->setSettings($passed);
        } elseif (!is_null($passed)) {
            $settings = $this->getSettingsInstance();

            return $settings->get($passed);
        }

        return $this->getSettingsInstance();
    }
748635
public function get_setting() {
        global $CFG;

        // First check if is not set.
        $result = $this->config_read($this->name);
        if (is_null($result)) {
            return null;
        }

        // For install cli script, $CFG->defaultuserroleid is not set so return 0
        // Or if web services aren't enabled this can't be,
        if (empty($CFG->defaultuserroleid) || empty($CFG->enablewebservices)) {
            return 0;
        }

        require_once($CFG->dirroot . '/webservice/lib.php');
        $webservicemanager = new webservice();
        $mobileservice = $webservicemanager->get_external_service_by_shortname(MOODLE_OFFICIAL_MOBILE_SERVICE);
        if ($mobileservice->enabled and $this->is_protocol_cap_allowed()) {
            return $result;
        } else {
            return 0;
        }
    }
1082041
public static function getSettings()
    {
        if (self::$settings === null) {
            $configuration = self::parseSettings();
            self::$settings = new EmConfiguration($configuration);
        }

        return self::$settings;
    }
1129307
public function get($key)
    {
        $setting = SettingModel::where('key', $key)->first();

        return $setting ? $setting->value : false;
    }
1231601
public function getSetting($path)
    {
        if (!$this->hasSetting($path)) {
            return null;
        }
        
        $value = $this->resolvePath($path);
        
        return $value;
    }
526595
public function get(string $key = null)
    {
        if (empty($key)) {
            return $this->settings;
        }

        if (\strpos($key, '.') != false) {
            return $this->getNested($key);
        }

        if ($this->has($key)) {
            return $this->settings[$key];
        }

        return null;
    }