Get a specific setting. If not exist, create the default one and return it.
@param $name
@return Setting
333915
public function getSetting($name)
    {
        if ($this->hasName($name) === false) {
            throw NameDoesNotExist::named($name, $this->alias());
        }
        /** @var SettingRepository $repository */
        $repository = app(SettingRepository::class);
        $query = $repository->getNewQuery();
        $query = $this->makeQueryFiltered($query);
        $setting = $query->where('name', $name)->first();
        if (!$setting) {
            $defaultValue = $this->getDefault($name);
            $this->update($name, $defaultValue);
            $setting = $query->first();
        }
        return $setting;
    }
1250710
protected function get_setting_value($name) {
        if (is_null($this->task)) {
            throw new restore_step_exception('not_specified_restore_task');
        }
        return $this->task->get_setting_value($name);
    }
795354
protected static function getOption($name, $default = null)
    {
        return isset(self::$options[$name]) ? self::$options[$name] : $default;
    }
1299621
public function getOptionOrDefault($name)
    {
        return isset($this->options[$name]) ? $this->options[$name] : $this->getDefault($name);
    }
776925
private function getConfigFor($name)
    {
        list($module, $settingName) = explode('::', $name);

        $result = [];
        foreach (config("society.$module.settings") as $sub) {
            $result = array_merge($result, $sub);
        }

        return Arr::get($result, "$settingName");
    }
71187
public static function get($name = null, $default = null)
    {
        self::init();

        if (!$name) {
            return self::$config;
        } else {
            if (isset(self::$config[$name])) {
                return self::$config[$name];
            } else {
                return $default;
            }
        }
    }
237763
public function getCustomConfig($name = '')
    {
        $custom_config = $this->getConfigByName('custom');
        return $name ? ($custom_config[$name] ?? null) : $custom_config;
    }
614440
public function getOption($name) {
		if (array_key_exists($name, $this->configuration)) {
			return $this->configuration[$name];
		}
		
		return null;
	}
2149
public function get($name, $default = null)
    {
        if (array_key_exists($name, $this->aliases)) {
            return $this->aliases[$name];
        } else {
            return $default;
        }
    }
697632
public function get(string $name): Constant
    {
        if (!$this->has($name)) {
            $constant = new Constant($name, null);
            parent::add($constant);

            return $constant;
        }

        return parent::get($name);
    }
1179916
public function get(string $name, $default = null)
    {
        return ($this->exists($name)) ? $this->map[$name] : $default;
    }
1255357
public function get(string $name): self
    {
        $this->type = self::TYPE_GET;
        $this->name = $name;
        $this->setValue(null, $this->type);

        return $this;
    }
543055
public function get_setting($name) {
        $result = null;
        if (isset($this->settings[$name])) {
            $result = $this->settings[$name];
        } else {
            throw new base_plan_exception('setting_by_name_not_found', $name);
        }
        return $result;
    }
15019
public static function settings($name = 'default') {
		if (!empty(self::$_engines[$name])) {
			return self::$_engines[$name]->settings();
		}
		return array();
	}
156250
public static function getSetting( string $name, $defaultValue = null )
	{
		return self::isSettingSet($name)
			? self::$settings[$name]
			: $defaultValue;
	}
899689
public static function getInstance(string $name = 'default'): self
    {
        if (!isset(self::$instances[$name])) {
            self::setInstance($name, new self());
        }

        return self::$instances[$name];
    }
1159455
public function getSetting($name)
    {
        if (!isset($this->settings[$name])) {
            throw new \LogicException(sprintf('The setting "%s" don\'t exists.', $name));
        }
        return $this->settings[$name];
    }