FastRoute icon indicating copy to clipboard operation
FastRoute copied to clipboard

Need for a RouteCollectorInterface

Open Gremlyn opened this issue 4 years ago • 2 comments

The way I am splitting up and loading routes requires me to pass the RouteCollector through to some methods, and I have built a custom RouteCollector that allows me to do reverse route lookup and generation. I'd like to be able to require a RouteCollectorInterface as the typehint, rather than my specific, custom RouteCollector - is there any appetite for that kind of modification?

Gremlyn avatar Feb 24 '20 17:02 Gremlyn

is there any appetite for that kind of moditifcation?

Yes, I would like to see interfaces for almost everything inside the lib.

burzum avatar Jul 22 '20 22:07 burzum

@Gremlyn can you use object composition instead, where your own route collector is sort of a decorator around the core FastRoute route collector?

kktsvetkov avatar Dec 27 '21 21:12 kktsvetkov