Gets a mod's config settings, loads it and store it on {@link $_config}
Checks if a $modSettings key exists and tries to load the info from it, defaults to check for a json file.
@access public
@return array
181923
public function getConfig(): array
	{
		global $txt, $modSettings;

		$file = $this->_app->boardDir .'/_config'. $this->_app->name .'.json';

		// Already loaded or does not use config?
		if ($this->_config || !$this->_app->useConfig)
			return $this->_config;

		// Check for a $modSettings key first.
		if (!empty($modSettings['_config'. $this->_app->name]))
			return $this->_config = smf_json_decode($modSettings['_config'. $this->_app->name], true);

		// Get the json file. Must be located in $boarddir folder.
		if (!$this->_config && !file_exists($file))
		{
			loadLanguage('Errors');
			log_error(sprintf($txt['error_bad_file'], $file));
		}

		else
			$this->_config = smf_json_decode(file_get_contents($file), true);

		return $this->_config;
	}
943745
protected function getConfigDefaults()
    {
        return [
            /* [string] @todo redis-name */
            'redis-name' => '',

            /* [string] @todo redis-prefix */
            'redis-prefix' => 'sockjs:',

            /* [string] @todo wss-name */
            'wss-name' => '',

            /* [Double] @todo batch-delay */
            'batch-delay' => new \PHPDaemon\Config\Entry\Double('0.05'),

            /* [Double] @todo heartbeat-interval */
            'heartbeat-interval' => new \PHPDaemon\Config\Entry\Double('25'),

            /* [Time] @todo dead-session-timeout */
            'dead-session-timeout' => new \PHPDaemon\Config\Entry\Time('1h'),

            /* [Size] @todo gc-max-response-size */
            'gc-max-response-size' => new \PHPDaemon\Config\Entry\Size('128k'),

            /* [Time] @todo network-timeout-read */
            'network-timeout-read' => new \PHPDaemon\Config\Entry\Time('2h'),

            /* [Time] @todo network-timeout-write */
            'network-timeout-write' => new \PHPDaemon\Config\Entry\Time('120s'),
        ];
    }
559749
protected function obtainLoadInfos()
    {
        $currentClass = get_called_class(); //Allow extends
        
        $this->loadInfos = $currentClass::readJsonFile(
            MODULES_DIR.$this->name
            .'/module.json'
        );
    }
1082041
public static function getSettings()
    {
        if (self::$settings === null) {
            $configuration = self::parseSettings();
            self::$settings = new EmConfiguration($configuration);
        }

        return self::$settings;
    }
353030
protected function getConfig()
    {
        if (!$this->table->getDataSource() instanceof Dom) {
            $this->prepareColumnsConfig();
        }
        $this->prepareExtensionsConfig();

        $config = [];
        $config += $this->table->getProperties();

        return json_encode($config);
    }
405684
protected function loadSettings()
    {
        $result = Eresus_CMS::getLegacyKernel()->db
            ->selectItem('plugins', "`name`='" . $this->getName() . "'");
        if ($result)
        {
            $this->settings = decodeOptions($result['settings'], $this->settings);
        }
        return (bool) $result;
    }
1367791
public function getConfig()
    {
        if ($this->config === null) {
            $path = $this->getInputDirectory() . '/makedocs.json';
            if (!is_file($path)) {
                throw new \RuntimeException('The input directory does not contain a makedocs.json file.');
            }

            $data = json_decode(file_get_contents($path));
            if (!$data) {
                throw new \RuntimeException('The JSON could not be loaded.');
            }

            $this->config = new Config((array)$data);
        }
        return $this->config;
    }
669535
protected function _getViewModeSettings()
    {
        $viewMode = $this->viewMode();
        $settings = [];
        if (!empty($this->metadata->view_modes[$viewMode])) {
            $settings = $this->metadata->view_modes[$viewMode];
        }

        return $settings;
    }
256029
public function fetchScriptSettings()
    {
        $data = [];

        $scriptSettings = $this->factory->getConnection()->getModeScriptSettings();

        /**
         * @var string $i
         */
        $i = 1;
        foreach ($scriptSettings as $name => $value) {
            $data[] = [
                'index' => $i++,
                'name' => $name,
                'value' => $value,
            ];
        }

        return $data;
    }
117034
protected function _getConf()
    {
        // retrieve and cache config
        $services = $this->services();

        /** @var aSapi $config */
        $config   = $services->get('/sapi');
        $orig = $config   = $config->config();
        /** @var DataEntity $config */
        $config   = $config->get(\Module\Authorization\Module::CONF, array());

        if (!isset($config[self::CONF]) && !is_array($config[self::CONF]))
            return null;


        $config   = $config[self::CONF];
        return $config;
    }
17109
public function showSettings()
    {
        // Get dependencies
        $settingMapper = ($this->container->dataMapper)('SettingMapper');
        $json = $this->container->json;

        // Fetch settings from database
        $allSettings = $settingMapper->findSiteSettings();

        // Fetch custom settings
        $jsonFilePath = ROOT_DIR . "structure/definitions/customSettings.json";
        if (null === $customSettings = $json->getJson($jsonFilePath, 'setting')) {
            $this->setAlert('danger', 'Custom Settings Error', $json->getErrorMessages());
        } else {
            // Merge saved settings with custom settings
            $allSettings = $this->mergeSettings($allSettings, $customSettings->settings);
        }

        return $this->render('editSettings.html', $allSettings);
    }
671747
public function getConfig(): array
    {
        if (empty($this->config)) {
            $yamlParser = new Parser();
            $files = $this->getFileNames();
            $config = [];
            foreach ($files as $file) {
                $fileConfig = $yamlParser->parseFile($file);
                $config = \array_merge($config, $fileConfig);
            }
            $this->config = $config;
        }
        return $this->config;
    }
902485
protected function getModulesAutoloadConfigWithoutCache()
    {
        $result = [];
        foreach ($this->modules as $moduleName => $moduleConfig) {
            $className = $moduleConfig['className'];
            $module    = new $className;
            if (!$module instanceof AbstractModule) {
                $errMsg = sprintf('Class "%s" must be extended from %s', $className, AbstractModule::class);
                throw new Exception\RuntimeException($errMsg);
            }
            $autoloadConfig = $module->getAutoloaderConfig();
            if (!ArrayUtils::isHashTable($autoloadConfig)) {
                $errMsg = sprintf('The autoloader configuration for module "%s" is invalid', $moduleName);
                throw new Exception\RuntimeException($errMsg);
            }
            $result = ArrayUtils::merge($result, $autoloadConfig);
        }
        
        foreach ($result as $moduleName => $configAutoload) {
            foreach ($configAutoload as $key => $value) {
                $result[$moduleName][$key] = realpath($value);
            }
        }
        
        return $result;
    }
524552
private static function getConfig() {

        if(!isset(self::$config)) {

            $default = Format::jsonToArray(File::get('../config/default.config.json'));
            $custom = Format::jsonToArray(File::get('../config/custom.config.json'));

            if ($default && $custom) {

                self::$config = self::merge($default, $custom);
            } else if ($default) {

                self::$config = $default;
            }
        }

        if(isset(self::$config)) {

            return self::$config;
        }        

        return false;
    }
1095564
public function loadConfiguration()
    {
        if (!file_exists($this->path)) {
            return array();
        }
        
        if (!is_readable($this->path)) {
            throw new Exception('The file "' . $this->path . '" isn\'t readable!');
        }
        
        $content = file_get_contents($this->path);
        $settings = json_decode($content, true);

        if ($settings == false) {
            return array();
        }
        
        return $settings;
    }
44932
protected function load_config() {
        global $DB;

        if (!$config = $DB->get_record('workshopform_rubric_config', array('workshopid' => $this->workshop->id), 'layout')) {
            $config = (object)array('layout' => 'list');
        }
        return $config;
    }
156034
public function getConfig()
    {
        // Create default keys for the config
        $config = array_merge([
            'width'   => null,
            'height'  => null,
            'options' => null,
        ], $this->config);

        // Add crops
        if ($crop = $this->getAttributeValue('crop_box')) {
            if (!is_array($config['options'])) {
                $config['options'] = [];
            }
            $config['options']['trim_perc'] = [
                round($crop->x1, 4),
                round($crop->y1, 4),
                round($crop->x2, 4),
                round($crop->y2, 4),
            ];
        }

        // Return config
        return $config;
    }