Aura.Router iterate all URIs

35 views
Skip to first unread message

Chris Johnson

unread,
Oct 16, 2018, 6:33:00 PM10/16/18
to The Aura Project for PHP
I'm building another RESTful API using RadarPHP which uses Aura.Router for its matching and routing.

Is there some way to get a read-only copy of the list of all routes and corresponding URIs out of Aura.Router, so that I can iterate that list as needed to create my discovery links?  I've read the documentation, and poked around the code a bit.  What I need is something like the Helper\Route method, but not just for the single named route passed as an argument that Helper\Route accepts.

This is what I'm using it for:

A common best practice for RESTful application architecture is to provide discoverability.  This comes about as a result of HATEOAS (Hypermedia as the Engine of Application State), which is a constraint of the REST application architecture. A hypermedia-driven site provides information to navigate the site's REST interfaces dynamically by including hypermedia links with the responses.  

Here is a link to an article introducing discoverability; there are lots of articles on the web for those interested:





Reply all
Reply to author
Forward
0 new messages