public static function buildFromConfiguration(): Database
    {
        if (!is_null(self::$sharedInstance)) {
             return self::$sharedInstance;
        }
        $config = Configuration::getDatabaseConfiguration();
        $instance = self::initializeFromConfiguration($config);
        if ($config['shared'] ?? false) {
            self::$sharedInstance = $instance;
        }
        return $instance;
    }
public static function buildFromConfiguration(): Database
    {
        if (!is_null(self::$sharedInstance)) {
             return self::$sharedInstance;
        }
        $config = Configuration::getDatabaseConfiguration();
        $instance = self::initializeFromConfiguration($config);
        if ($config['shared'] ?? false) {
            self::$sharedInstance = $instance;
        }
        return $instance;
    }
public static function buildFromConfiguration ( ) : Database { if ( ! is_null ( self :: $ sharedInstance ) ) { return self :: $ sharedInstance ; } $ config = Configuration :: getDatabaseConfiguration ( ) ; $ instance = self :: initializeFromConfiguration ( $ config ) ; if ( $ config [ 'shared' ] ?? false ) { self :: $ sharedInstance = $ instance ; } return $ instance ; }
Constructs a database instance from the defined configurations.

@throws DatabaseException
@return Database
Constructs a database instance from the defined configurations .