anandkunal/ToroPHP — pull request #60 by small1 (2013-09-23 16:24:18+00:00)
Title: Added Toro::hashandlerfor function to check if a route is served or not

We needed a good way of checking if a route is served or not. So that we can serve different routes depending on user access.

Sample code:

function GenHREF($href, $caption)
{
/*
* custom href that knows about toro-handlers
*
* result if foo refers to a toro-handler :
* bar
* result if foo doesn't refer to a toro-handler :
* bar
*/
if (Toro::hashandlerfor($href))
return "$caption";
else
return $caption;
}