It returns the project's Composer config as a PHP array.

@return array
769032
private function getProjectConfig()
    {
        $composerJsonPath = $this->projectDir.'/composer.json';
        if (!is_writable($composerJsonPath)) {
            return [];
        }

        return json_decode(file_get_contents($composerJsonPath), true);
    }
727810
public function toArray(): array
    {
        $config = [];

        if ($this->config->has('key')) {
            $config['key'] = $this->getKey();
        } else {
            $config['key'] = Key::generate($this->getKey(), 'field');
        }

        if ($this->config->has('conditional_logic')) {
            $config['conditional_logic'] = $this->getConditionalLogic();
        }

        if ($this->config->has('layouts')) {
            $config['layouts'] = $this->getLayouts();
        }

        if ($this->config->has('sub_fields')) {
            $config['sub_fields'] = $this->getSubFields();
        }

        return array_merge($this->config->toArray(), $config);
    }
811652
public static function getConfiguration(): array
    {
        static $configuration;
        if (\is_array($configuration)) {
            return $configuration;
        }
        if (VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version())['version_main'] < 9) {
            $configuration = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['staticfilecache']) ? (array)\unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['staticfilecache']) : [];
        } else {
            $configuration = (array)GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('staticfilecache');
        }

        return $configuration;
    }
1088594
public function asArray(): array
    {
        $data = [
            'name' => $this->project->getName(),
            'path' => $this->project->getPath(),
        ];
        if (($foregroundColor = $this->project->getForegroundColor())) {
            $data['foreground_color'] = $foregroundColor;
        }
        if (($backgroundColor = $this->project->getBackgroundColor())) {
            $data['background_color'] = $backgroundColor;
        }

        return $data;
    }
690865
public static function getComponentConfig()
    {
        $config = new self();
        $config->getSmtpConfig();
        return [
            'useFileTransport' => false,
            'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => $config->smtp_host,
                'username' => $config->smtp_username,
                'password' => $config->smtp_password,
                'port' => $config->smtp_port,
                'encryption' => $config->smtp_encryption,

            ],
            'messageConfig' => [
                'charset' => 'UTF-8',
                'from' => [$config->smtp_username => $config->smtp_nickname]
            ],
        ];
    }
1236675
public function toArray()
    {
        $array = array();
        $data  = $this->__options;
        foreach ($data as $key => $value)
        {
            if ($value instanceof ObjectConfig) {
                $array[$key] = $value->toArray();
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
656388
public static function configs()
    {
        $files = File::allFiles(base_path().'/plugins');
        $result = [];
        foreach ($files as $file){
            if($file->getBasename() == "config.json") {
                $result[] = json_decode(File::get($file->getPathname()));
            }
        }
        return $result;
    }
362855
protected function getConfigs()
    {
        if ($this->hasCache()) {
            return $this->getCache();
        }

        $pluginConfigs = $this->pluginConfig;

        $configs = [];

        foreach ($pluginConfigs as $name => $pluginConfig) {
            $config = $this->configFields->convertBc(
                $name,
                $pluginConfig
            );

            $configs[] = new ConfigBasic($config);
        }

        $newConfigs = $this->configRepositoryJson->find();

        $configs = array_merge($configs, $newConfigs);

        $this->setCache($configs);

        return $configs;
    }
922066
public function modules(): array
    {
        $modules = [];

        foreach (glob(__DIR__ . '/*.php') as $module) {
            $className = basename($module, '.php');
            $class = __NAMESPACE__ . '\\' . $className;
            $config = $this->modulesPath . '/' . strtolower("{$className}.inc");
            $interfaces = class_implements($class);

            if (!in_array('TwigWp\Module\Injectable', $interfaces, true)) {
                continue;
            }

            if (file_exists($config)) {
                /** @noinspection PhpIncludeInspection */
                $config = require_once $config;
                $modules[$className] = new $class($config);
                continue;
            }

            $modules[$module] = new $class();
        }

        /**
         * Filter Modules
         *
         * @since 1.0.0
         *
         * @param array $modules The registered modules.
         * @param \Twig\Environment $twig The Twig Environment Instance.
         */
        $modules = apply_filters('twigwp.modules', $modules, $this->twig);

        return array_filter($modules);
    }
824663
public function getConfig() {
		$result = [];
		$pluginName = $this->_getPluginName();
		if (empty($pluginName) || !Configure::check($pluginName)) {
			return $result;
		}

		$result = (array)Configure::read($pluginName);

		return $result;
	}
987013
public function getConfig()
	{
		return $this->_node->__isset( 'config' ) && is_array( $this->_node->config ) ? $this->_node->__get( 'config' ) : array();
	}
1133290
public function loadConfig()
    {
        $path = $this->getConfigPath();

        if (!is_dir($path)) {
            return [];
        }

        $configs = Cache::remember("moduleConfig::{$path}", Carbon::now()->addMinutes(10), function () use ($path) {
            $configs = [];
            foreach (new \DirectoryIterator($path) as $file) {
                if ($file->isDot() or strpos($file->getFilename(), '.php') === false) {
                    continue;
                }
                $key = $file->getBasename('.php');
                $configs[$key] = array_merge_recursive(require $file->getPathname(), app('config')->get($key, []));
            }

            return $configs;
        });

        return $configs;
    }
968799
public function getUthandoConfig(): array
    {
        $config             = [];
        $configFilePattern  = join('/', [
            $this->getModulePath(),
            $this->configDirectory,
            $this->filePattern,
        ]);

        foreach (glob($configFilePattern) as $filename) {
            /** @noinspection PhpIncludeInspection */
            $configFile = include $filename;
            $config     = array_merge($config, $configFile);
        }

        return $config;
    }
829810
public function getConfig()
    {
        if ($this->cache instanceof Cache\CacheInterface && !empty($configs = $this->cache->getConfig())) {
            return $configs;
        }

        $configs = $this->moduleHandler->getModulesConfig();
        foreach ($this->files as $file) {
            $config = require $file;
            if (!is_array($config)) {
                throw new Exception\RuntimeException(sprintf('The config in "%s" file must be array data type', $file));
            }
            $configs = ArrayUtils::merge($configs, require $file);
        }

        return $this->cleanUp($configs);
    }
932510
protected function configurations(): Collection
    {
        $configurations = collect();

        foreach ($this->configurationFiles as $alias => $file) {
            if (is_numeric($alias)) {
                $alias = $file;
            }

            $key = $alias;
            if (ends_with($key, '.php')) {
                $key = str_replace('.php', '', $key);
            }

            $configurations->push([
                'file' => $file,
                'alias' => $alias,
                'key' => $key,
            ]);
        }

        return $configurations;
    }
1228912
public function getPluginsConfig()
    {
        $config = [
            'block'     => [],
            'container' => [],
        ];
        foreach ($this->pluginRegistry->getBlockPlugins() as $plugin) {
            $config['block'][] = [
                'name'  => $plugin->getName(),
                'title' => $plugin->getTitle(),
                'path'  => $plugin->getJavascriptFilePath(),
            ];
        }
        foreach ($this->pluginRegistry->getContainerPlugins() as $plugin) {
            $config['container'][] = [
                'name'  => $plugin->getName(),
                'title' => $plugin->getTitle(),
                'path'  => $plugin->getJavascriptFilePath(),
            ];
        }

        return $config;
    }
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;
	}