AdsUser::GetSetting PHP 메소드

GetSetting() 개인적인 메소드

Gets the value for a given setting based on the contents of the parsed INI file.
private GetSetting ( array $settings, string $section, string $name, mixed $default = null ) : string
$settings array the parsed settings INI file
$section string the name of the section containing the setting
$name string the name of the setting
$default mixed the default value of the setting
리턴 string the value of the setting
    private function GetSetting($settings, $section, $name, $default = null)
    {
        if (!$settings || !array_key_exists($section, $settings) || !array_key_exists($name, $settings[$section]) || $settings[$section][$name] === null || $settings[$section][$name] === '') {
            return $default;
        }
        return $settings[$section][$name];
    }