Get provider configurations

@throws BaseException
@return array
358671
public function getProviderConfig()
    {

        if (empty($this->config) === false) {
            return $this->config;
        } else {

            throw new BaseException((new \ReflectionClass(get_class()))->getShortName(), 'Empty provider config', 500);
        }
    }
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;
    }
930858
protected function getModuleConfig(): array
    {
        $merged = [];
        $merger = $this->getMerger();
        foreach ($this->getModules() as $module) {
            if ($module instanceof ConditionProviderInterface && $module->isConditioned() === true) {
                continue;
            }

            if ($module instanceof ConfigProviderInterface) {
                $merged = $merger->merge(
                    $merged,
                    $module->getConfig()->load()
                );
            }
        }

        return $merged;
    }
572156
public function getConfig(): array
    {
        $ref = new \ReflectionClass(get_class($this));
        $properties = $ref->getProperties();
        $config = [];

        //set default values
        foreach ($properties as $property) {
            $value = $property->getValue($this);
            if (null !== $value) {
                $config[Inflector::tableize($property->getName())] = $property->getValue($this);
            }
        }

        return $config;
    }
1111913
public function getGeneralSettings()
    {
        return [
            'guard' => [
                'path' => '/config/auth.php',
                'search' => "'guards' => [",
                'stub' => __DIR__ . '/../stubs/config/guards.stub',
                'prefix' => false,
            ],
            'provider' => [
                'path' => '/config/auth.php',
                'search' => "'providers' => [",
                'stub' => __DIR__ . '/../stubs/config/providers.stub',
                'prefix' => false,
            ],
            'passwords' => [
                'path' => '/config/auth.php',
                'search' => "'passwords' => [",
                'stub' => __DIR__ . '/../stubs/config/passwords.stub',
                'prefix' => false,
            ],
            'kernel' => [
                'path' => '/app/Http/Kernel.php',
                'search' => 'protected $routeMiddleware = [',
                'stub' => __DIR__ . '/../stubs/Middleware/Kernel.stub',
                'prefix' => false,
            ],
            'map_register' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => '$this->mapWebRoutes();',
                'stub' => __DIR__ . '/../stubs/routes/map-register.stub',
                'prefix' => false,
            ],
            'map_method' => [
                'path' => '/app/Providers/RouteServiceProvider.php',
                'search' => "    /**\n" . '     * Define the "web" routes for the application.',
                'stub' => __DIR__ . '/../stubs/routes/map-method.stub',
                'prefix' => true,
            ],
        ];
    }
1288630
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('openclassrooms_cache');
        $rootNode
            ->children()
                ->arrayNode('provider')
                ->performNoDeepMerging()
                ->beforeNormalization()
                    ->ifString()
                    ->then(function($v) { return array($v => array()); })
                ->end()
                    ->children()
                        ->append($this->addArrayNode())
                        ->append($this->addRedisNode())
                    ->end()
                ->end()
            ->end()
            ->children()
                ->scalarNode('default_lifetime')
                    ->defaultValue(0)
                ->end()
            ->end();

        return $treeBuilder;
    }
1290886
protected function getConfig(): array
    {
        $loader = null;
        if ($this->isCacheEnabled() === true) {
            $loader = $this->getLoader();
            $cached = $loader->load();
            if (empty($cached) === false) {
                return $cached;
            }
        }

        if ($this->isFrameworkEnabled() === true) {
            $this->addFrameworkConfigs();
        }

        $merged = [];
        $merger = $this->getMerger();
        foreach ($this->getConfigs() as $config) {
            $merged = $merger->merge(
                $merged,
                $config->load()
            );
        }

        foreach ($this->getGlobalConfig() as $global) {
            $merged = $merger->merge($merged, $global);
        }

        foreach ($this->getModuleConfig() as $module) {
            $merged = $merger->merge($merged, $module);
        }

        if ($this->isCacheEnabled() === true) {
            if ($loader instanceof CacheLoader) {
                $loader->save($merged);
            }
        }

        return $merged;
    }
945683
public function getConfigs()
    {
        $configs = [];

        foreach ($this->getConfigFiles() as $file) {
            $name = basename($file->getFilename(), '.php');

            $values = require $file->getRealPath();

            $configs[$name] = $values;
        }

        return $configs;
    }
490754
public static function getSettings()
    {
        $configuration = self::parseSettings();
        require_once(ExtensionManagementUtility::extPath('dvoconnector') . 'Classes/Domain/Model/EmConfiguration.php');
        $settings = new \RGU\Dvoconnector\Domain\Model\EmConfiguration($configuration);
        return $settings;
    }
1339578
public function getConfig()
    {
        if ($this->config) {
            return $this->config;
        }

        $config = $this->getDefaultConfig();

        // read from database
        $result = $this->connection->fetchAll('SELECT type, class FROM fusio_provider ORDER BY class ASC');
        foreach ($result as $row) {
            $this->mergeClass($config, $row['type'], $row['class']);
        }

        // read from file
        if (!empty($this->file)) {
            $result = include($this->file);

            if (is_array($result)) {
                foreach ($result as $type => $classes) {
                    foreach ($classes as $class) {
                        $this->mergeClass($config, $type, $class);
                    }
                }
            }
        }

        return $this->config = new ProviderConfig($config);
    }
1328192
protected function getBaseOptions()
    {
        $options = [
            'base_uri' => method_exists($this, 'getBaseUri') ? $this->getBaseUri() : '',
            'timeout' => property_exists($this, 'timeout') ? $this->timeout : 5.0,
        ];

        return $options;
    }
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;
    }
1330405
public function getExtendedConfig() {
        $config = array();
        foreach ($this->getOption(self::OPTION_CONFIG_SOURCES) as $key => $source) {
            $config[$key] = $source->getConfig();
        }
        return $config;
    }
201813
protected function getConfiguredSolrConnections()
    {
        $configuredSolrConnections = [];
        // find website roots and languages for this installation
        $rootPages = $this->pagesRepositoryAtExtSolr->findAllRootPages();
        $languages = $this->systemLanguageRepository->findSystemLanguages();

        // find solr configurations and add them as function menu entries
        foreach ($rootPages as $rootPage) {
            foreach ($languages as $languageId) {
                $connection = $this->getConfiguredSolrConnectionByRootPage($rootPage, $languageId);

                if (!empty($connection)) {
                    $configuredSolrConnections[$connection['connectionKey']] = $connection;
                }
            }
        }

        return $configuredSolrConnections;
    }
838229
private function getProvider()
	{
		$providerData = null;

		if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
			$authBasicHeader = trim($_SERVER['HTTP_AUTHORIZATION']);

			preg_match('/^Basic (.+)$/', $authBasicHeader, $matches);
			@list($login, $password) = explode(':', base64_decode($matches[1]));
			$providerData = array(
				'login'    => $login,
				'password' => $password,
			);
		}

		if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
			$providerData = array(
				'login'    => (int)trim($_SERVER['PHP_AUTH_USER']),
				'password' => trim($_SERVER['PHP_AUTH_PW']),
			);
		}

		return $providerData;
	}
988409
public function getDependencyConfig(): array
    {
        return [
            'aliases' => [
                SessionManager::class => ManagerInterface::class,
            ],
            'factories' => [
                ConfigInterface::class => SessionConfigFactory::class,
                ManagerInterface::class => SessionManagerFactory::class,
                StorageInterface::class => StorageFactory::class,

                SessionOptions::class => SessionOptionsFactory::class,
                SessionMiddleware::class => SessionMiddlewareFactory::class,
            ],
            'abstract_factories' => [
                ContainerAbstractServiceFactory::class,
            ]
        ];
    }
203249
protected function getServerInitConfig()
    {
        return [
            'host'      => isset($this->config['host']) ? $this->config['host'] : '0.0.0.0',
            'port'      => isset($this->config['port']) ? $this->config['port'] : 80,
            'sockType'  => isset($this->config['sockType']) ? $this->config['sockType'] : SWOOLE_SOCK_TCP,
            'mode'      => isset($this->config['mode']) ? $this->config['mode'] : SWOOLE_PROCESS,
        ];
    }