Returns accepted things setting from the client browser

@return array
181906
private function getClientBrowserAccepted()
    {
        $this->autoPopulateSuperGlobals();
        $sReturn = [
            'accept'          => $this->brServerGlobals->server->get('HTTP_ACCEPT'),
            'accept_encoding' => $this->brServerGlobals->server->get('HTTP_ACCEPT_ENCODING'),
        ];
        if (!is_null($this->brServerGlobals->server->get('HTTP_ACCEPT_LANGUAGE'))) {
            $sReturn['accept_language']     = $this->brServerGlobals->server->get('HTTP_ACCEPT_LANGUAGE');
            $prfd                           = null;
            preg_match_all('/([a-z]{2})(?:-[a-zA-Z]{2})?/', $sReturn['accept_language'], $prfd);
            $sReturn['preferred locale']    = $prfd[0];
            $sReturn['preferred languages'] = array_values(array_unique(array_values($prfd[1])));
        }
        return $sReturn;
    }
294490
public function setSettingsByRequest()
    {
        $allAllowedSettings = array_keys($this->allSettings()->toArray());

        return $this->settings()->set(request()->only($allAllowedSettings));
    }
1288888
public function getDefaults()
    {
        return [
            'activation_token_expire' => self::SECONDS_ACTIVATION_TOKEN_EXPIRE,
            'allow_polls' => self::FLAG_ALLOW_POLLS,
            'email_token_expire' => self::SECONDS_EMAIL_TOKEN_EXPIRE,
            'from_email' => self::DEFAULT_FROM_EMAIL,
            'from_name' => self::DEFAULT_FROM_NAME,
            'hot_minimum' => self::HOT_MINIMUM,
            'maintenance_mode' => self::MAINTENANCE_MODE,
            'max_attempts' => self::MAX_SEND_ATTEMPTS,
            'members_visible' => self::FLAG_MEMBERS_VISIBLE,
            'merge_posts' => self::FLAG_MERGE_POSTS,
            'meta_description' => self::META_DESCRIPTION,
            'meta_keywords' => self::META_KEYWORDS,
            'name' => self::PODIUM_NAME,
            'password_reset_token_expire' => self::SECONDS_PASSWORD_RESET_TOKEN_EXPIRE,
            'recaptcha_secretkey' => '',
            'recaptcha_sitekey' => '',
            'registration_off' => self::REGISTRATION_OFF,
            'use_captcha' => self::FLAG_USE_CAPTCHA,
            'use_wysiwyg' => self::FLAG_USE_WYSIWYG,
            'version' => Podium::getInstance()->version,
        ];
    }
1221771
public function getSettings()
    {
        $aValidSettings = $this->getValidSettings();
        $aSettings      = array();

        foreach ( $aValidSettings as $sSettingName ) {
            $aSettings[$sSettingName] = $this->getSetting( $sSettingName );
        }

        return $aSettings;
    }
587817
public function get_setting() {
        $result1 = $this->config_read($this->name);
        $result2 = $this->config_read($this->name2);
        if (is_null($result1) or is_null($result2)) {
            return NULL;
        }

        return array('h' => $result1, 'm' => $result2);
    }
317380
private function _allowedStyles(): array
    {
        $styles = [];
        $plugins = array_flip($this->_getRedactorConfig()['plugins'] ?? []);
        if (isset($plugins['alignment'])) {
            $styles['text-align'] = true;
        }
        if (isset($plugins['fontcolor'])) {
            $styles['color'] = true;
        }
        if (isset($plugins['fontfamily'])) {
            $styles['font-family'] = true;
        }
        if (isset($plugins['fontsize'])) {
            $styles['font-size'] = true;
        }
        return $styles;
    }
289256
public function get_setting() {
        $result = $this->config_read($this->name);

        if (is_null($result)) {
            return NULL;
        }
        if ($result === '') {
            return array();
        }
        $enabled = explode(',', $result);
        $setting = array();
        foreach ($enabled as $option) {
            $setting[$option] = 1;
        }
        return $setting;
    }
333912
private function getListSettings()
    {
        $settingsStorage = $this->getSettingsStorage();
        if (!$settingsStorage->exists(CspHeaderSettingsInterface::CSP_HEADER_LIST)) {
            return [];
        }

        return json_decode($settingsStorage->get(CspHeaderSettingsInterface::CSP_HEADER_LIST));
    }
121270
public static function getAcceptLanguage(): array
    {
        if (!self::$language) {
            // get header from request
            self::$language = self::parseAcceptHeader(self::getHeader('Accept-Language'));
        }
        return self::$language;
    }
1255553
private function getContextOptions()
    {
        $opts = array(
            'http'=>array(
                'ignore_errors' => true,
                'header' => "Accept: application/json, */*\r\nContent-Encoding: gzip\r\n"
            ),
        );

        if (!empty($this->config->getCertificateAuthorityPath())) {
            $opts['ssl']['cafile'] = $this->config->getCertificateAuthorityPath();
        }

        if (!empty($this->config->getClientCertificatePath())) {
            $opts['ssl']['local_cert'] = $this->config->getClientCertificatePath();
        }

        if (!empty($this->config->getClientKeyPath())) {
            $opts['ssl']['local_pk'] = $this->config->getClientKeyPath();
        }

        $token = $this->config->getToken();
        if (!empty($token)) {
            $opts['http']['header'] .= "Authorization: Bearer ${token}\r\n";
        }

        return $opts;
    }
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],
        );
    }
294127
public static function get_settings() {
		// If the gforms plugin is not active.
		if ( ! class_exists( 'GFWebAPI' ) ) {
			return false;
		}

		$settings = get_option( 'gravityformsaddon_gravityformswebapi_settings' );

		// If the API is not enabled.
		if ( empty( $settings ) || ! $settings['enabled'] ) {
			return false;
		}

		$forms = [];

		$method = 'GET';

		$expires = strtotime( self::SIGNATURE_EXPIRY );

		foreach ( \GFAPI::get_forms() as $form ) {

			$get_form_route = 'forms/' . $form['id'];

			$string_to_sign = sprintf( '%s:%s:%s:%s', $settings['public_key'], $method, $get_form_route, $expires );

			$forms[ $form['id'] ] = [
				'get_form' => [
					'route' => $get_form_route,
					'expires' => $expires,
					'signature' => self::calculate_signature( $string_to_sign, $settings['private_key'] ),
				],
				'post_submission' => [
					'route' => 'forms/' . $form['id'] . '/submissions',
				],
			];
		}

		return [
			'api_base' => GFWEBAPI_API_BASE_URL,
			'api_key' => $settings['public_key'],
			'forms' => $forms,
		];
	}
1197274
protected function getMediaFinderSettings() : array
    {
        $sMode = $this->getSettingValue(self::TYPE_MEDIA_FINDER);
        if (!in_array($sMode, ['file', 'image'])) {
            return [];
        }

        $arResult = [
            'type' => self::TYPE_MEDIA_FINDER,
            'mode' => $sMode,
        ];

        return $arResult;
    }
802314
public function getTextSettings()
    {
        $messages = array(
            'gaf_id' => $this->_('Sub filter may not be the same as this filter.'),
            $this->_('Filters may be chosen only once.')
                );

        return array(
            'gaf_filter_text1' => array(
                'label'        => $this->_('Filter 1'),
                'elementClass' => 'Select',
                'multiOptions' => $this->_filters,
                'required'     => true,
                'validator'    => new \MUtil_Validate_NotEqualTo('gaf_id', $messages),
                ),
            'gaf_filter_text2' => array(
                'label'        => $this->_('Filter 2'),
                'elementClass' => 'Select',
                'multiOptions' => $this->_filters,
                'required'     => true,
                'validator'    => new \MUtil_Validate_NotEqualTo(array('gaf_id', 'gaf_filter_text1'), $messages),
                ),
            'gaf_filter_text3' => array(
                'label'        => $this->_('Filter 3'),
                'elementClass' => 'Select',
                'multiOptions' => $this->_filters,
                'validator'    => new \MUtil_Validate_NotEqualTo(
                        array('gaf_id', 'gaf_filter_text1', 'gaf_filter_text2'),
                        $messages
                        ),
                ),
            'gaf_filter_text4' => array(
                'label'        => $this->_('Filter 4'),
                'elementClass' => 'Select',
                'multiOptions' => $this->_filters,
                'validator'    => new \MUtil_Validate_NotEqualTo(
                        array('gaf_id', 'gaf_filter_text1', 'gaf_filter_text2', 'gaf_filter_text3'),
                        $messages
                        ),
                ),
            );
    }
1331415
public function get_setting() {
        $result = $this->config_read($this->name);
        if (is_null($result)) {
            return NULL;
        }
        if ($result === '') {
            return array();
        }
        return explode(',', $result);
    }
62747
public function GetActiveSettingAsArray()
    {
        $aData = array();
        if (is_array($this->aActiveFilterData) || !empty($this->aActiveFilterData)) {
            $aData = array(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA => array($this->id => $this->aActiveFilterData));
        }

        return $aData;
    }
989888
public static function getAll()
    {
        return [
            self::SWITCHING_PROTOCOLS             => 'Switching Protocols',
            self::PROCESSING                      => 'Processing',
            self::OK                              => 'OK',
            self::CREATED                         => 'Created',
            self::ACCEPTED                        => 'Accepted',
            self::NONAUTHORITATIVE_INFORMATION    => 'Non-Authoritative Information',
            self::NO_CONTENT                      => 'No Content',
            self::RESET_CONTENT                   => 'Reset Content',
            self::PARTIAL_CONTENT                 => 'Partial Content',
            self::MULTIPLE_CHOICES                => 'Multiple Choices',
            self::MOVED_PERMANENTLY               => 'Moved Permanently',
            self::MOVED_TEMPORARILY               => 'Moved Temporarily',
            self::SEE_OTHER                       => 'See Other',
            self::NOT_MODIFIED                    => 'Not Modified',
            self::USE_PROXY                       => 'Use Proxy',
            self::BAD_REQUEST                     => 'Bad Request',
            self::UNAUTHORIZED                    => 'Unauthorized',
            self::PAYMENT_REQUIRED                => 'Payment Required',
            self::FORBIDDEN                       => 'Forbidden',
            self::NOT_FOUND                       => 'Not Found',
            self::METHOD_NOT_ALLOWED              => 'Method Not Allowed',
            self::NOT_ACCEPTABLE                  => 'Not Acceptable',
            self::PROXY_AUTHENTICATION_REQUIRED   => 'Proxy Authentication Required',
            self::REQUEST_TIMEOUT                 => 'Request Time-out',
            self::CONFLICT                        => 'Conflict',
            self::GONE                            => 'Gone',
            self::LENGTH_REQUIRED                 => 'Length Required',
            self::PRECONDITION_FAILED             => 'Precondition Failed',
            self::REQUEST_ENTITY_TOO_LARGE        => 'Request Entity Too Large',
            self::REQUESTURI_TOO_LARGE            => 'Request-URL Too Long',
            self::UNSUPPORTED_MEDIA_TYPE          => 'Unsupported Media Type',
            self::REQUESTED_RANGE_NOT_SATISFIABLE => 'Requested range not satisfiable',
            self::EXPECTATION_FAILED              => 'Expectation Failed',
            self::IM_A_TEAPOT                     => 'I\'m a teapot',
            self::UNAVAILABLE_FOR_LEGAL_REASONS   => 'Unavailable For Legal Reasons',
            self::INTERNAL_SERVER_ERROR           => 'Internal Server Error',
            self::NOT_IMPLEMENTED                 => 'Not Implemented',
            self::BAD_GATEWAY                     => 'Bad Gateway',
            self::SERVICE_UNAVAILABLE             => 'Service Unavailable',
            self::GATEWAY_TIMEOUT                 => 'Gateway Time-out',
            self::HTTP_VERSION_NOT_SUPPORTED      => 'HTTP Version not supported',
        ];
    }