Find a config variable and return it.
@param string $name
@param string $default
@return mixed
968766
private function getValue ($name, $default)
	{
		$parts = explode ('.', $name);
		$file = array_shift ($parts);

		$this->loadFile ($file);

		if (! isset ($this->files[$file])) {
			return $default;
		}
		else {
			$out = $this->files[$file];
			foreach ($parts as $part)
			{
				if (!isset ($out[$part]))
				{
					return $default;
				}
				else {
					$out = $out[$part];
				}
			}
		}

		return $out;
	}
37221
public function getConfigParam($name, $default = null)
    {
        $this->init();

        if (isset($this->_aConfigParams[$name])) {
            $value = $this->_aConfigParams[$name];
        } elseif (isset($this->$name)) {
            $value = $this->$name;
        } else {
            $value = $default;
        }

        return $value;
    }
1280548
public function get($name, $default = null, $file = null) {
            $configVal = null;

            if(is_array($this->config)) {
                if($file === null) {
                    if(count(array_column($this->config, $name)) > 0) {
                        $configVal = array_column($this->config, $name)[0];
                    } else {
                        $configVal = array_column($this->config, $name);
                    }
                } else {
                    if(count(array_column($this->config->$file, $name)) > 0) {
                        $configVal = array_column($this->config->$file, $name)[0];
                    } else {
                        $configVal = array_column($this->config->$file, $name);
                    }
                }
            }

            if(empty($configVal)) {
                return $default;
            }

            return $configVal;
        }
714867
public static function getString($name, $default = null)
    {
        if (isset($_GET[$name]) && $_GET[$name] !== '') return self::parseInputToString($_GET[$name]);
        return $default;
    }
627289
public static function get(string $name, $default = null)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if('@currentServer' === $first)
            {
                if($isCurrentServer = (RequestContext::exsits() && null !== ($server = RequestContext::getServer())))
                {
                    $first = '@server';
                    array_unshift($names, $server->getName());
                }
                else
                {
                    $first = '@app';
                }
            }
            else
            {
                $isCurrentServer = false;
            }
            if(isset(static::$configs[$first]))
            {
                $result = static::$configs[$first]->get($names, null);
            }
            if(isset($result))
            {
                return $result;
            }
            else if($isCurrentServer)
            {
                $first = '@app';
                array_shift($names);
                return static::$configs[$first]->get($names, $default);
            }
        }
        return $default;
    }
1213483
public function getConfig($name, $default = false)
    {
        foreach ($this->configs as $config) {
            if ($config->getName() == $name) {
                return $config->getValue();
            }
        }

        return $default;
    }
719482
public function getParameter($name, $default = NULL)
	{
		if (isset($this->params[$name])) {
			return $this->params[$name];

		} else {
			return $default;
		}
	}
199202
public static function get($name, $default = '') {
        $_GET = self::paramFilter($_GET);
        if (isset($_GET[$name])) {
            if (empty($_GET[$name])) {
                return $default;
            }
            return $_GET[$name];
        }
        return false;
    }
1089122
public function getValue($name, $default = null)
    {
        $setting = $this->get($name);

        if ($setting) {
            return $setting->getValue();
        }

        return $default;
    }
1154225
public static function getVarGet($name,$default){
		self::init();
		$res=isset(self::$variables[$name])?self::$variables[$name]:$default;
		return $res;
		}
952630
public static function cfg($name = '@default', $default = '') {
        $app  = self::$app;
        $keys = null;
        if ($name != null) {
            $names = explode('@', $name);
            if ($names[0]) {
                $name = $names[0];
                $keys = explode('.', $name);
                $name = array_shift($keys);
            } else {
                $name = null;
            }
            if (isset($names[1]) && $names[1]) {
                $config = $names[1];
            } else {
                $config = 'default';
            }
        } else {
            $config = 'default';
        }
        if (isset ($app->configs [ $config ])) {
            $confObj = $app->configs [ $config ];
        } else {
            $confObj = $app->configLoader->loadConfig($config);
            if (!$confObj) {
                $confObj = new Configuration ($config);
            }
            $app->configs [ $config ] = $confObj;
        }

        if ($name == null) {
            return $confObj;
        } else {
            $values = $confObj->get($name, $default);
            if ($keys && is_array($values)) {
                foreach ($keys as $ky) {
                    if (isset($values[ $ky ])) {
                        $values = $values[ $ky ];
                    }
                }
            }

            return $values;
        }
    }
720649
public function getOption($name, $default = null)
    {
        return array_key_exists($name, $this->raw['options'])
            ? $this->raw['options'][$name]
            : $default;
    }
1219056
public function getParam($name, $default = null)
    {
        if (isset($this->params[$name])) {
            return $this->params[$name];
        }

        return $default;
    }
534237
public function get($name, $default = null)
    {
        return array_key_exists($name, $this->_states) ? $this->_states[$name] : $default;
    }
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;
            }
        }
    }
992702
protected function getTemplateVariable($name, $default = null)
    {
        return array_key_exists($name, $this->templateVars)?$this->templateVars[$name]:$default;
    }
139733
public function get($name, $default = null)
    {
        $result = $default;
        if (array_key_exists($name, $this->_data)) {
            $result = $this->_data[$name];
        }
        return $result;
    }