Хотя для этой библиотеки/утилиты и нет подробной документации, она применяется в
нескольких продакшен-проектах достаточно долгое время, поэтому вы
можете спокойно ее использовать. Ниже приводится содержимое файла README.txt.
Dklab_Route: Library to match() and assemble() URLs using various methods.
(C) Dmitry Koterov, http://en.dklab.ru/lib/Dklab_Route/
This library parses and builds URLs according to specified rules. It is
a bit low-level, but powerful.
Feature: match() and assemble() URLs using named parameters
Suppose each developer has its own domain zone:
example.com.IVAN.dev.local
example.com.PETR.dev.local
example.com.ALEX.dev.local
The library supports transparent "*.dev.local" (or similar) zones addition
or subtraction for each URL it is used for. You may specify "*.dev.local"
rule, and the developer name (e.g. IVAN) will be deduced automatically
based on the current HTTP_HOST.
E.g. $router->assemble(array("name" => "post_edit", "username" => "ivan", "id" => 10));
may be translated to "http://ivan.example.com.PETR.dev.local/post/123/edit".