4 ms·
Not just a router but Epiphany[1] lets you specify a regex for routes[2]. My favorite part though is the API module which I blogged about a while back[3]. [1]
by jmathai 13y ago
Not just a router but Epiphany[1] lets you specify a regex for routes[2]. My favorite part though is the API module which I blogged about a while back[3].
[1] https://github.com/jmathai/epiphany https://github.com/jmathai/epiphany
[2] https://github.com/jmathai/epiphany/blob/master/examples/regex-route/index.php https://github.com/jmathai/epiphany/blob/master/examples/reg...
[3] https://trovebox.com/blog/building-trovebox-entirely-using-our-api/ https://trovebox.com/blog/building-trovebox-entirely-using-o...
- fidz 13y agoIt still use sequential matching[0]. What i meant is something like AST implementation in routing algorithm, which is obviously faster than sequential algorithm [1] [2] [0]: https://github.com/jmathai/epiphany/blob/master/src/EpiRoute.php#L171 https://github.com/jmathai/epiphany/blob/master/src/EpiRoute... [1]: http://en.wikipedia.org/wiki/Shunting-yard_algorithm http://en.wikipedia.org/wiki/Shunting-yard_algorithm [2]: http://blog.bigbinary.com/2013/01/29/journey-into-rails-routing.html http://blog.bigbinary.com/2013/01/29/journey-into-rails-rout...