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

        if ($removeservice == false) {
            return ((new Renderer())->jsonRenderer(array("code" => 500, "msg" => "Service does not exist")));
        }

        $render = json_encode($file, JSON_PRETTY_PRINT);
        file_put_contents(FEnv::get("framework.config.core.services.file"), $render);

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

        if ($removeservice == false) {
            return ((new Renderer())->jsonRenderer(array("code" => 500, "msg" => "Service does not exist")));
        }

        $render = json_encode($file, JSON_PRETTY_PRINT);
        file_put_contents(FEnv::get("framework.config.core.services.file"), $render);

        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
    }
public function removeActivity ( string $ servicename ) : Renderer { $ removeservice = false ; $ file = JL :: open ( FEnv :: get ( "framework.config.core.services.file" ) ) ; foreach ( $ file as $ one => $ value ) { if ( $ one == $ servicename ) { unset ( $ file -> $ one ) ; $ removeservice = true ; break ; } } if ( $ removeservice == false ) { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 500 , "msg" => "Service does not exist" ) ) ) ; } $ render = json_encode ( $ file , JSON_PRETTY_PRINT ) ; file_put_contents ( FEnv :: get ( "framework.config.core.services.file" ) , $ render ) ; return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "msg" => "OK" ) ) ) ; }
remove one service
@param string $servicename Service name
@return Renderer
@throws \Exception
remove one service