HEX
Server: Apache
System: Linux gains.linuxbigapps.com 4.18.0-553.74.1.lve.el8.x86_64 #1 SMP Tue Sep 9 14:25:24 UTC 2025 x86_64
User: mountains (1551)
PHP: 8.0.30
Disabled: allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo
Upload Files
File: /home/mountains/public_html/wp-content/plugins/fluentform/framework/Config/ConfigProvider.php
<?php

namespace FluentForm\Framework\Config;

use RecursiveIteratorIterator;
use RecursiveDirectoryIterator;
use FluentForm\Framework\Foundation\Provider;

class ConfigProvider extends Provider
{
    /**
     * The provider booting method to boot this provider
     * @return void
     */
	public function booting()
    {
        $config = new Config(array('app' => $this->app->getAppConfig()));

        $this->app->bindInstance(
            'config', $config, 'Config', 'FluentForm\Framework\Config\Config'
        );
    }

    /**
     * The provider booted method to be called after booting
     * @return void
     */
    public function booted()
    {
        $this->loadConfig();
    }

    /**
     * Loads all configuration files from config directory
     * @return void
     */
	public function loadConfig()
    {
    	$files = [];
        $configPath = $this->app->configPath();
        $itr = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(
            $configPath, RecursiveDirectoryIterator::SKIP_DOTS
        ));

        foreach($itr as $file) {
            if (pathinfo($file, PATHINFO_EXTENSION) == "php" && $file->getFileName() != 'app.php') {
                $fileRealPath = $file->getRealPath();
                $directory = $this->getDirectory($file, $configPath);
                $this->app->config->set($directory.basename($fileRealPath, '.php'), include $fileRealPath);
            }
        }
    }

    /**
     * Get nested directory names joined by a "."
     * @param  string $file [A config file]
     * @param  string $configPath
     * @return string
     */
    protected function getDirectory($file, $configPath)
    {
        $ds = DIRECTORY_SEPARATOR;

        if ($directory = trim(str_replace(trim($configPath, '/'), '', $file->getPath()), $ds)) {
            $directory = str_replace($ds, '.', $directory).'.';
        }

        return $directory;
    }
}