public function removeActivity(string $dbconfiguration):Renderer
    {
        $remove = false;
        $file = JL::open(FEnv::get("framework.config.db.file"));
        foreach ($file as $one => $value) {
            if ($one == $dbconfiguration) {
                unset($file->$one);
                $remove = true;
                break;
            }
        }

        if ($remove == false) {
            return ((new Renderer())->jsonRenderer(array("code" => 500, "msg" =>
                "Database configuration does not exist")));
        }
        $file = json_encode((object) $file, JSON_PRETTY_PRINT);
        JL::put(FEnv::get("framework.config.db.file"), $file);


        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
    }
public function removeActivity(string $dbconfiguration):Renderer
    {
        $remove = false;
        $file = JL::open(FEnv::get("framework.config.db.file"));
        foreach ($file as $one => $value) {
            if ($one == $dbconfiguration) {
                unset($file->$one);
                $remove = true;
                break;
            }
        }

        if ($remove == false) {
            return ((new Renderer())->jsonRenderer(array("code" => 500, "msg" =>
                "Database configuration does not exist")));
        }
        $file = json_encode((object) $file, JSON_PRETTY_PRINT);
        JL::put(FEnv::get("framework.config.db.file"), $file);


        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
    }
public function removeActivity ( string $ dbconfiguration ) : Renderer { $ remove = false ; $ file = JL :: open ( FEnv :: get ( "framework.config.db.file" ) ) ; foreach ( $ file as $ one => $ value ) { if ( $ one == $ dbconfiguration ) { unset ( $ file -> $ one ) ; $ remove = true ; break ; } } if ( $ remove == false ) { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 500 , "msg" => "Database configuration does not exist" ) ) ) ; } $ file = json_encode ( ( object ) $ file , JSON_PRETTY_PRINT ) ; JL :: put ( FEnv :: get ( "framework.config.db.file" ) , $ file ) ; return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "msg" => "OK" ) ) ) ; }
remove one database
@param string $dbconfiguration Database configuration name
@return Renderer
@throws \Exception
remove one database