Are routes processed in order?

51 views
Skip to first unread message

Baz L

unread,
Oct 4, 2011, 9:18:24 PM10/4/11
to GluePHP
If I put my specific routes at the top and more general routes are the
bottom, can I put a very general regex at the bottom as a catch all
where I can process 404 errors?

Joe

unread,
Oct 6, 2011, 1:49:27 PM10/6/11
to GluePHP
Hi Baz,

The $urls array goes through a krsort() when you pass it through the
stick() method. This should sort your URLs so that most specific URLs
are processed before least-specific ones. You can print out your own
krsort($urls) to see the exact order on how they would be processed.

Thanks,
Joe
Reply all
Reply to author
Forward
0 new messages