def __run_middleware__(self, middleware_list):
        """
        Gets the middleware attached to the route and executes it before the route is called. Middlewares in Bast are run before the
        Controller Logic is executed. Returns true once it has been run successfully
        """
        middleware_location = 'middleware'
        return_value = False
        try:
            for func in middleware_list:
                middleware_func = importlib.import_module('{0}.'.format(middleware_location) + func)
                if hasattr(middleware_func, func):
                    class_name = getattr(middleware_func, func)
                    handle = getattr(class_name, 'handle')
                    return_value = handle(class_name, self)
                    return return_value
        except Exception as e:
            print("There is an Error in your Middleware ", e)

        return return_value
def __run_middleware__ ( self , middleware_list ) : middleware_location = 'middleware' return_value = False try : for func in middleware_list : middleware_func = importlib . import_module ( '{0}.' . format ( middleware_location ) + func ) if hasattr ( middleware_func , func ) : class_name = getattr ( middleware_func , func ) handle = getattr ( class_name , 'handle' ) return_value = handle ( class_name , self ) return return_value except Exception as e : print ( "There is an Error in your Middleware " , e ) return return_value
Gets the middleware attached to the route and executes it before the route is called. Middlewares in Bast are run before the
        Controller Logic is executed. Returns true once it has been run successfully