How icydrae/router works
Component Relationships
a. Primary Flow:
• HTTP Request → Router → RouteCollector → Dispatcher → Handler (Controller/Closure)
b. Supporting Components:
• RouteCollector ←→ RouteParser
• RouteCollector ←→ DataGenerator
Key Features
• Route registration flow
• Route matching process
• Exception handling paths
• Controller resolution path
• HTTP method handling (GET, POST, PUT, etc.)
Detailed Component Breakdown
• Exception Handling:
• ClassNotFoundException
• InvalidRouteException
• MethodNotAllowedException
• MethodNotCalledException
Important Elements to Highlight
a. Router Features:
• Static routing
• Dynamic routing (with parameters)
• Subrouting (groups)
• Controller@method resolution
• HEAD request handling
b. Data Flow:
• Route registration
• Route parsing
• Route matching
• Handler dispatch