Scalr\Model\Entity\Account\User::getSetting PHP Метод

getSetting() публичный Метод

Gets specified setting
public getSetting ( string $name, boolean $useCache = true ) : string | null
$name string The name of the setting
$useCache boolean optional Whether it should use cache
Результат string | null Returns the value on success or NULL if it does not exist.
    public function getSetting($name, $useCache = true)
    {
        if (!$useCache || $this->_settings === null || !array_key_exists($name, $this->_settings)) {
            if ($this->_settings === null) {
                $this->fetchSettings();
            } else {
                $this->_settings[$name] = UserSetting::getValue([$this->id, $name]);
            }
        }
        return isset($this->_settings[$name]) ? $this->_settings[$name] : null;
    }