Get a Moodle config value.

@param string $name the config name

@return string
517312
public function getConfig($name)
    {
        $this->requireConfig();

        if (!property_exists($this->cfg, $name)) {
            throw new \RuntimeException(sprintf('Failed to find $CFG->%s in Moodle config file', $name));
        }

        return $this->cfg->$name;
    }
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;
    }
84087
public function getConfigValue($section,$name)
    {
        $values=$this->getConfigValues($section);
        if(array_key_exists($name, $values)){
            return $values[$name];
        }
        return null;
    }
542559
protected function getConfig( $name )
	{
		$name = $name ?: $this->getDefaultConnection();

		// To get the database connection configuration, we will just pull each of the
		// connection configurations and get the configurations for the given name.
		// If the configuration doesn't exist, we'll throw an exception and bail.
		$connections = Framework::config()->get( 'database.connections' );

		if ( is_null( $config = Arr::get( $connections, $name ) ) )
			throw new InvalidArgumentException( "Database [$name] not configured." );

		return $config;
	}
237763
public function getCustomConfig($name = '')
    {
        $custom_config = $this->getConfigByName('custom');
        return $name ? ($custom_config[$name] ?? null) : $custom_config;
    }
205914
public function getSetting( string $name, $defaultValue = null )
	{
		return $this->isSettingSet($name)
			? $this->settings[$name]
			: $defaultValue;
	}
1047444
public function get($name)
    {
        return isset($this->value[$name])
            ? $this->value[$name]
            : null;
    }
1144559
public static function get($name = '')
    {
        if (!empty($name)) {
            if (false !== strpos($name, '.')) {

                $data = explode('.', $name, 2);
                $data[0] = strtolower($data[0]);

                if (isset($data[1]) && $data[1]) {
                    return isset(self::$config[$data[0]][$data[1]]) ? self::$config[$data[0]][$data[1]] : null;
                }
                return isset(self::$config[$data[0]]) ? self::$config[$data[0]] : null;
            } else {
                return isset(self::$config[$name]) ? self::$config[$name] : null;
            }
        }
        return self::$config;
    }
1361475
public function getValue($name)
	{
		if (! isset($this->values[$name]))
		{
			$this->values[$name] = arg($name);
		}

		return $this->values[$name];
	}
473331
public function getValue(string $name)
    {
        if (isset($this->valuesAsArray[$name])) {
            return $this->valuesAsArray[$name];
        }

        if (!array_key_exists($name, $this->values)) {
            return null;
        }

        $return = $this->values[$name]['value'] ?? null;

        if ($return === '') {
            $return = null;
        }

        return $return;
    }
655580
public function getValue($name)
    {

        $returnValue = '';

        if (array_key_exists($name, $this->variablesForTemplate)) {
            $returnValue = $this->variablesForTemplate[$name];
        }

        return $returnValue;
    }
194959
protected function get_config($name, $default = null) {
        $value = get_config($this->component, $name);
        if ($value !== false) {
            return $value;
        }
        return $default;
    }
498666
public function getConfigParam($name)
    {
        $result = null;
        $config = $this->getConfiguration();
        $parts  = explode('.', $name);
        foreach ($parts as $key) {
            if (isset($config[$key])) {
                $result = $config = $config[$key];
            } else {
                $result = null;
                break;
            }
        }
        return $result;
    }
262134
public function get($name = null) {
		if ($name === null) {
			$result = [];
			$this->_configurations = array_filter($this->_configurations);

			foreach ($this->_configurations as $key => $value) {
				$result[$key] = $this->get($key);
			}
			return $result;
		}

		$settings = &$this->_configurations;

		if (!isset($settings[$name])) {
			return null;
		}

		if (isset($settings[$name][0])) {
			return $settings[$name][0];
		}
		$env = Environment::get();

		$config = isset($settings[$name][$env]) ? $settings[$name][$env] : $settings[$name];

		$method = is_callable($this->initConfig) ? $this->initConfig : null;
		$settings[$name][0] = $method ? $method($name, $config) : $config;
		return $settings[$name][0];
	}
819101
public function getConfig($name = null)
    {
        if (!is_null($name)) {
            if (isset($this->_config[$name])) {
                return $this->_config[$name];
            } else {
                return null;
            }
        }

        return $this->_config;
    }
718037
public function getValue($name)
    {
        $value = null;
        if ($this->has($name)) {
            $value = call_user_func_array(
                [$this->_inputs[$name], 'getValue'],
                [$name]
            );
        }
        return $value;
    }
723370
public function getConfig($name) {
        return isset($this->settings[$name]) ? $this->settings[$name] : null;
    }