Usage: {config item='' default=''}
Required: item

@return  mixed string or array
541942
public function config_get($params) {
        if (isset($params['item'])) {
            $default = $params['default'] ? null : $params['default'];
            return Config::get($params['item'], $default);
        }
        return '';
    }
27721
static function get($key, $default = null) {
    if (isset(Config::$values[$key])) {
      return Config::$values[$key];
    } else {
      if (Config::isEmpty()) {
        throw new ConfigException("Site configuration has not been initialised for '$key'");
      } else if ($default !== null) {
        return $default;
      } else {
        throw new ConfigException("No site configuration value found for '$key'");
      }
    }
  }
1308198
public function getListItemDetailsConfig()
    {
        $config = [];
        
        if (is_array($this->owner->config()->default_list_item_details)) {
            $config = $this->owner->config()->default_list_item_details;
        }
        
        if (is_array($this->owner->config()->list_item_details)) {
            
            foreach ($this->owner->config()->list_item_details as $name => $spec) {
                
                if (!$spec) {
                    unset($config[$name]);
                }
                
            }
            
            $config = array_merge_recursive($config, $this->owner->config()->list_item_details);
            
        }
        
        return $config;
    }
256519
public function getDefaultValue()
    {
        if (1 != $this->parameters->get('defaultValueIsNull')) {
            $defaultValue = $this->parameters->get('defaultValue');
            if (strlen($defaultValue) && 'NULL' != $defaultValue) {
                return trim($defaultValue, '\'"');
            }
        }
    }
998347
public function getConfig($key = null, $default = null)
    {
        $name = $this->current ?: 'default';

        $configs = $this->configs[$name];
        if ($key === null) {
            return $configs;
        }

        return isset($configs[$key]) ? $configs[$key] : $default;
    }
557441
private function get($key, $default = null)
    {
        if ( ! empty($this->config[$key])) {
            return $this->config[$key];
        }

        if (function_exists('config')) {
            if (null !== (config($key))) {
                return config($key);
            }
        }
        
        return $default;
    }
174223
protected function initDefaults()
    {
        if (!$this->hasDefaults) {
            return '';
        }

        $this->defaultsLocation = get_calling_class_directory($this) . DIRECTORY_SEPARATOR . $this->defaultsLocation;

        return ConfigFactory::loadConfigFile($this->defaultsLocation);
    }
1166766
protected function setDefault()
    {
        if (strpos($this->input, '=')) {
            list($this->input, $this->default) = explode('=', $this->input);

            $this->modeArray[] = 'OPTIONAL';
        }

        return $this;
    }
819009
protected function defaultConstrain(): string
    {
        if (empty($this->defaultConstraint)) {
            $this->defaultConstraint = $this->table . '_' . $this->getName() . '_default_' . uniqid();
        }

        return $this->defaultConstraint;
    }
1288813
public function getDefaultOptions()
    {
        if (! $this->defaults) {
            return null;
        }

        if ($this->defaults instanceof ConfigInterface) {
            return $this->defaults->getArrayCopy();
        }

        return (array)$this->defaults;
    }
1367768
public function get_defaultsetting() {
        $adminroot =  admin_get_root(false, false);
        if (!empty($adminroot->custom_defaults)) {
            $plugin = is_null($this->plugin) ? 'moodle' : $this->plugin;
            if (isset($adminroot->custom_defaults[$plugin])) {
                if (array_key_exists($this->name, $adminroot->custom_defaults[$plugin])) { // null is valid value here ;-)
                    return $adminroot->custom_defaults[$plugin][$this->name];
                }
            }
        }
        return $this->defaultsetting;
    }
308880
public function getConfigValue($keys, $default = null)
    {
        $value = $this->_config;
        foreach ((array) $keys as $key) {
            if (isset($value[$key])) {
                $value = $value[$key];
            } else {
                return $default;
            }
        }

        return $value;
    }
437725
public function get($key, $default = null)
	{
		if(array_key_exists($key, $this->items))
		{
			return $this->items[$key];
		}

		return $default;
	}
1246106
public function get($key, $default = null)
    {
        $data = Arr::get($this->config, $key);

        if ($data === null) {
            $data = is_array($default) ? new self($default) : $default;
        }

        return $data;
    }
390291
public function get($key, $default = null)
    {
        $pieces = explode('.', $key);
        $config = $this->config;

        foreach ($pieces as $piece) {
            if (!isset($config[$piece])) {
                return $default;
            }

            $config = $config[$piece];
        }

        return $config;
    }
1180699
public function getItem($config)
    {
        //why would you send an empty value?
        if(empty($config) || !is_string($config)) {
            return false;
        }

        $data = $this->loadConfig($config);

        //no config data available
        if(!is_array($data)) {
            return false;
        }

        //return item object
        return new Item($data);
    }
1331415
public function get_setting() {
        $result = $this->config_read($this->name);
        if (is_null($result)) {
            return NULL;
        }
        if ($result === '') {
            return array();
        }
        return explode(',', $result);
    }