Abstract matching route logic to ::matchRoute() method