Gets a specific mod config array.
@access public
@param string $name The name of an specific setting, if empty it will return the entire array.
@return array
970780
public function get($name = '')
	{
		// This needs to be extended by somebody else!
		if(!$this->_app->name)
			return [];

		// Not defined huh?
		if (!$this->_config)
			$this->getConfig();

		return $name ? (isset($this->_config['_'. $name]) ? $this->_config['_'. $name] : []) : $this->_config;
	}
15019
public static function settings($name = 'default') {
		if (!empty(self::$_engines[$name])) {
			return self::$_engines[$name]->settings();
		}
		return array();
	}
206695
public function getSetting($name, $default = NULL) {
    $setting_name_lookup = array(
      'data_directory'  => 'module_builder_hooks_directory',
      'detail_level'    => 'module_builder_detail',
      'footer'          => 'module_builder_footer',
    );

    if (isset($setting_name_lookup[$name])) {
      return variable_get($setting_name_lookup[$name], $default);
    }
    else {
      return $default;
    }

  }
527743
public function getConfigArray($name)
    {
        $result = array_get($this->getConfig(), $name, []);

        if (is_string($result)) {
            $fileName = File::symbolizePath($result);

            if (File::isLocalPath($fileName)) {
                $path = $fileName;
            }
            else {
                $path = $this->getPath().'/'.$result;
            }

            if (!File::exists($path)) {
                throw new ApplicationException('Path does not exist: '.$path);
            }

            $result = Yaml::parseFile($path);
        }

        return (array) $result;
    }
913193
public function setting(string $name)
    {
        if (isset($this->settings[$name])) {
            return $this->settings[$name];
        }

        return null;
    }
67858
public function getOption($name) {
		$this->validateName($name);
		if (array_key_exists($name, $this->config))
			return $this->config[$name];
	
		return null;
	}
1078013
public static function getModuleInstanceByName($name)
    {
        $instance = self::getInstance();
        foreach ($instance->getModules() as $module) {
            if ($module->title === $name) {
                return $module;
            }
        }
        return null;
    }
669996
protected static function _defaultConfig($name)
    {
        $defaults = [
            'php' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                ]
            ],
            'cake' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.serialize_handler' => 'php',
                    'session.use_cookies' => 1,
                    'session.save_path' => TMP . 'sessions',
                    'session.save_handler' => 'files'
                ]
            ],
            'cache' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.use_cookies' => 1,
                    'session.save_handler' => 'user',
                ],
                'handler' => [
                    'engine' => 'CacheSession',
                    'config' => 'default'
                ]
            ],
            'database' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.use_cookies' => 1,
                    'session.save_handler' => 'user',
                    'session.serialize_handler' => 'php',
                ],
                'handler' => [
                    'engine' => 'DatabaseSession'
                ]
            ]
        ];

        if (isset($defaults[$name])) {
            return $defaults[$name];
        }

        return false;
    }
1008892
public function getOption($name, $default = null)
    {
        $config = $this->getConfig();

        return array_key_exists($name, $config) ? $config[$name] : $default;
    }
608373
public function getVar($name)
    {
		$this->loadVars();
    
        if (isset($this->_config[$name])) {
            return $this->_config[$name];
        } else {
            return false;
        }
    }
1239583
protected function getConfig($name)
    {
        if (empty($name)) {
            throw new InvalidArgumentException("Script Engine 'name' can not be empty.");
        }

        $engines = $this->app['config']['df.script'];

        return array_get($engines, $name, []);
    }
442652
public function getArray($name)
    {
        return isset($this->arguments[$name]) ? $this->arguments[$name]->values() : [];
    }
768861
public function &get($name)
    {
        if (!isset($this->mergedSettings[$name])) {
            $this->mergedSettings[$name] = array();
        }

        $result =& $this->mergedSettings[$name];
        return $result;
    }
78584
static public function getPresets($name = self::FULL)
    {
        if ($presets = ArrayHelper::getValue(self::$presets, $name)) {
            return (array)$presets;
        }

        return [];
    }
792233
private function getServiceConfig(string $name)
    {
        $config = $this->services()[$name] ?? null;
        if ($config === null) {
            return null;
        }

        if (\is_string($config)) {
            return [
                'class' => $config,
            ];
        }
        if (\is_array($config) && array_key_exists('class', $config)) {
            return $config;
        }

        throw new InvalidConfigException('Config must be either type of string (class name) or array (with `class` element');
    }
901783
public static function get($name=null){
        if(isset(self::$o->config[$name])) {
            return self::$o->config[$name];
        }
        if (strpos($name, '.')) {
            list($field,$index) = explode('.', $name, 2);
            $field = self::$o->config[$field];
            if(isset($field[$index])) {
                return $field[$index];
            }
            return null;
        }
        if($name === null) {
            return self::$o->config;
        }
        return null;
    }
717022
public static function get($name)
    {
        $blueprints = new Blueprints('plugins://');
        $blueprint = $blueprints->get("{$name}/blueprints");

        // Load default configuration.
        $file = CompiledYamlFile::instance("plugins://{$name}/{$name}" . YAML_EXT);

        // ensure this is a valid plugin
        if (!$file->exists()) {
            return null;
        }

        $obj = new Data((array)$file->content(), $blueprint);

        // Override with user configuration.
        $obj->merge(Grav::instance()['config']->get('plugins.' . $name) ?: []);

        // Save configuration always to user/config.
        $file = CompiledYamlFile::instance("config://plugins/{$name}.yaml");
        $obj->file($file);

        return $obj;
    }