HEX
Server: Apache
System: Linux sxb1plzcpnl503971.prod.sxb1.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64
User: nciq25gegoxa (9650876)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/nciq25gegoxa/public_html/wp-content/plugins/filebird/includes/Classes/Config.php
<?php
namespace FileBird\Classes;

class Config {
    private static $loaded_configs = array();

    /**
     * Set config
     *
     * Eg: Config::setConfig('PostType', $data);
     * or: Config::setConfig('PostType.name', 'foo');
     */

    public static function setConfig( $name, $data ) {
        $ex = explode( '.', $name );
        if ( count( $ex ) == 1 ) {
            self::$loaded_configs[ $name ] = $data;
        } elseif ( count( $ex ) == 2 ) {
            if ( ! isset( self::$loaded_configs[ $ex[0] ] ) ) {
                self::$loaded_configs[ $ex[0] ] = array();
            }
            self::$loaded_configs[ $ex[0] ][ $ex[1] ] = $data;
        }

    }

    /**
     * Get loaded config
     *
     * Eg: Config::getConfig('PostType.name');
     */

    public static function getConfig( $name ) {
        $ex = explode( '.', $name );
        if ( count( $ex ) == 2 ) {
            if ( isset( self::$loaded_configs[ $ex[0] ] ) && isset( self::$loaded_configs[ $ex[0] ][ $ex[1] ] ) ) {
                return self::$loaded_configs[ $ex[0] ][ $ex[1] ];
            }
        }
    }
}