bcosca/fatfree — pull request #467 by bagia (2013-12-17 07:52:20+00:00)
Title: Introducing a helper to name routes.

Routes can now be named:
$f3->route(['my_route' => 'GET /my/route/@route_id'], function($f3) {
});
The url can be retrieved by name:
[PHP Template]
url('my_route', ['route_id'=>12]); ?>
[F3 Template]
{{ F3::url('my_route', ['route_id'=>12]) }}
This allows to reference routes by name in the code to decouple the route from its use. Then if we want to change a route we can do it in only one file.