设置配置信息

@param array $setting 缺省

@return void
192341
public function setting($setting = []) {
		
		/*
		 * 指定某一个服务运行仅设置该服务下的配置
		 */
		if (false === empty($this->service) && true === isset($this->config[$this->service])) {
			$setting = $this->config[$this->service];
			unset($setting['host'], $setting['port'], $setting['mode'], $setting['socket']);
			parent::set($setting);
		} else {
			/*
			 * 设置所有配置信息
			 */
			foreach ($this->config as $key => $value) {
				unset($value['host'], $value['port'], $value['mode'], $value['socket']);
				$setting[$key] = $value;
				parent::set($setting[$key]);
			}
		}
		
	}
294658
public function injectSettings(array $settings)
    {
        if (isset($settings['security']['authentication']['authenticationStrategy'])) {
            $authenticationStrategyName = $settings['security']['authentication']['authenticationStrategy'];
            switch ($authenticationStrategyName) {
                case 'allTokens':
                    $this->authenticationStrategy = self::AUTHENTICATE_ALL_TOKENS;
                    break;
                case 'oneToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_ONE_TOKEN;
                    break;
                case 'atLeastOneToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_AT_LEAST_ONE_TOKEN;
                    break;
                case 'anyToken':
                    $this->authenticationStrategy = self::AUTHENTICATE_ANY_TOKEN;
                    break;
                default:
                    throw new Exception('Invalid setting "' . $authenticationStrategyName . '" for security.authentication.authenticationStrategy', 1291043022);
            }
        }

        if (isset($settings['security']['csrf']['csrfStrategy'])) {
            $csrfStrategyName = $settings['security']['csrf']['csrfStrategy'];
            switch ($csrfStrategyName) {
                case 'onePerRequest':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_REQUEST;
                    break;
                case 'onePerSession':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_SESSION;
                    break;
                case 'onePerUri':
                    $this->csrfProtectionStrategy = self::CSRF_ONE_PER_URI;
                    break;
                default:
                    throw new Exception('Invalid setting "' . $csrfStrategyName . '" for security.csrf.csrfStrategy', 1291043024);
            }
        }
    }
1084113
private static function parseSetting($setting)
    {
        if (is_string($setting) &&
        false !== strpos($setting, \WebServCo\Framework\Settings::DIVIDER)) {
            return explode(\WebServCo\Framework\Settings::DIVIDER, $setting);
        }
        return $setting;
    }
714006
public function youTryToGetSettingWithinSection($setting, $section)
    {
        $this->responseValue = $this->settingService->section($section)->get($setting, 'null');
    }
272721
public function is_setting( $setting ) {
		return isset( $this->_setting_priority[ $setting ], $this->_settings[ $this->_setting_priority[ $setting ] ] );
	}
11285
public function set($setting, $value = null) {
        $this->store->set($setting, $value);
        $this->dirty = true;
    }
1363700
public function settings(array $settings = null)
    {
        if ($settings) {
            $this->_settings = array_merge($this->_settings, $settings);
        }
        return $this->_settings;
    }
780036
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        if (is_array($setting)) {
            if (isset($setting['remote_class_type'])) {
                $this->remoteModelType = $setting['remote_class_type'];
            }
        }
    }
1038059
public function setLabelsSettings(array $Settings = [])
    {
        if (isset($Settings["Type"])) {
            $this->Labels["Type"] = $Settings["Type"];
        }
        if (isset($Settings["R"])) {
            $this->Labels["R"] = $Settings["R"];
        }
        if (isset($Settings["G"])) {
            $this->Labels["G"] = $Settings["G"];
        }
        if (isset($Settings["B"])) {
            $this->Labels["B"] = $Settings["B"];
        }
        if (isset($Settings["Alpha"])) {
            $this->Labels["Alpha"] = $Settings["Alpha"];
        }
    }
1257984
public function settings(Array $settings = []) : Upload
    {
        foreach( $settings as $key => $val )
        {
            $this->settings[$key] = $val;
        }

        return $this;
    }
833220
public function setFromRequest($settings)
    {
        $this->removeTokenKey($settings);

        foreach ($settings as $settingName => $settingValues) {
            $this->set($settingName, $settingValues);
        }
    }
1122833
public function initSettings(array $settings)
    {
        if (!isset($settings['tcp'])) {
            throw new \InvalidArgumentException('Tcp startup parameter is not configured，settings=' . \json_encode($settings));
        }

        if (!isset($settings['http'])) {
            throw new \InvalidArgumentException('HTTP startup parameters is not configured, settings=' . \json_encode($settings));
        }

        if (!isset($settings['server'])) {
            throw new \InvalidArgumentException('server startup parameters is not configured, settings=' . \json_encode($settings));
        }

        if (!isset($settings['setting'])) {
            throw new \InvalidArgumentException('"setting" parameters is not configured, settings=' . \json_encode($settings));
        }

        foreach ($settings['setting'] as $key => $value) {
            // path alias
            if ($value && \is_string($value) && $value[0] === '@') {
                $settings['setting'][$key] = App::getAlias($value);
            }
        }

        $this->setting = $settings['setting'];
        $this->tcpSetting = $settings['tcp'];
        $this->httpSetting = $settings['http'];
        $this->serverSetting = $settings['server'];

        // fix bug must to int
        if (isset($this->setting['task_ipc_mode'])) {
            $this->setting['task_ipc_mode'] = (int)$this->setting['task_ipc_mode'];
        }
        if (isset($this->setting['message_queue_key'])) {
            $this->setting['message_queue_key'] = (int)$this->setting['message_queue_key'];
        }
    }
676508
private function syncSettings(array $settings)
    {
        if (false === getenv($this->envOriginalInis)) {
            // Called by another app, so make original inis available
            Process::setEnv($this->envOriginalInis, implode(PATH_SEPARATOR, $settings['inis']));
        }

        self::$skipped = $settings['skipped'];
        $this->notify(Status::INFO, 'Process called with existing restart settings');
    }
567774
public function importSetting($setting)
    {
        $short_name = basename(str_replace('\\', '/', get_class($setting)));

        $method = 'importSetting' . $short_name;

        if (method_exists($this, $method)) {
            $this->$method($setting);
        }
    }
958219
public static function settings($settings=array())
		{
			self::$_readOnce 		= isset($settings['readOnce']) ? (boolean) $settings['readOnce'] : false;
			self::$_defaultReturn 	= (array_key_exists('defaultReturn',$settings)) ? $settings['defaultReturn'] : 'ST__EXCEPTION';
		}
535088
private function _loadSettingsFromArray($settings)
    {
        if (isset($settings['sp'])) {
            $this->_sp = $settings['sp'];
        }
        if (isset($settings['idp'])) {
            $this->_idp = $settings['idp'];
        }

        $errors = $this->checkSettings($settings);
        if (empty($errors)) {
            $this->_errors = array();

            if (isset($settings['strict'])) {
                $this->_strict = $settings['strict'];
            }
            if (isset($settings['debug'])) {
                $this->_debug = $settings['debug'];
            }

            if (isset($settings['baseurl'])) {
                $this->_baseurl = $settings['baseurl'];
            }

            if (isset($settings['compress'])) {
                $this->_compress = $settings['compress'];
            }

            if (isset($settings['security'])) {
                $this->_security = $settings['security'];
            }

            if (isset($settings['contactPerson'])) {
                $this->_contacts = $settings['contactPerson'];
            }

            if (isset($settings['organization'])) {
                $this->_organization = $settings['organization'];
            }

            $this->_addDefaultValues();
            return true;
        } else {
            $this->_errors = $errors;
            return false;
        }
    }
1036025
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        $this->model = $model;
        if (is_array($setting)) {
            if (!isset($setting['remote_class_type'])) {
                throw new \Stack\Exception\MissingSetting('"remote_class_type" missing for the OneToMany relation.');
            }
            if (!isset($setting['related_attribute_name'])) {
                throw new \Stack\Exception\MissingSetting('"related_attribute_name" missing for the OneToMany relation.');
            }
            if (isset($setting['filter_list'])) {
                $this->filterList = $setting['filter_list'];
            }
            if (isset($setting['unique_remote'])) {
                $this->uniqueRemote = !!$setting['unique_remote'];
            }
            $this->remoteModelType = $setting['remote_class_type'];
            $this->relatedAttributeName = $setting['related_attribute_name'];
        }
    }