def __init__(self, path, controller, action='action', methods=None, requirements=None, protocols=None, host='.*'):
        """
        @type path: str
        @type controller: str
        @type action: str
        @type methods: tuple
        @type requirements: dict
        @type protocols: tuple
        @type host: str
        """
        if methods:
            methods = self._sanitize_methods(methods)
            self._check_methods(methods)
        else:
            methods = Route.ALLOWED_METHODS

        requirements = self._sanitize_requirements(requirements)

        self.path = self._sanitize_path(path)
        self.controller = controller
        self.action = action
        self.methods = methods
        self.protocols = protocols if protocols else ('http', 'https')
        self.requirements = requirements
        self.host = host
def __init__ ( self , path , controller , action = 'action' , methods = None , requirements = None , protocols = None , host = '.*' ) : if methods : methods = self . _sanitize_methods ( methods ) self . _check_methods ( methods ) else : methods = Route . ALLOWED_METHODS requirements = self . _sanitize_requirements ( requirements ) self . path = self . _sanitize_path ( path ) self . controller = controller self . action = action self . methods = methods self . protocols = protocols if protocols else ( 'http' , 'https' ) self . requirements = requirements self . host = host
@type path: str
        @type controller: str
        @type action: str
        @type methods: tuple
        @type requirements: dict
        @type protocols: tuple
        @type host: str