codeguy/Slim — Issue #215: Let urlFor() be compatible with wild card or regex route patterns
Author: codeguy
Created: 2012-01-08 05:04:33+00:00
State: open
Labels: Priority - Medium, Type - New Feature

Because regular expression and wildcard routes are not inherently compatible with the `urlFor()` helper, we need to allow the developer to also specify a default route pattern template to be used with `urlFor()`. Example concept:

$app->get('/foo/*', function ($splat) {
//Do something
})->name('foo')->template('/foo/:placeholder');

$url = $app->urlFor('foo', array('placeholder' => 'bar'));

The `$url` variable would equal "/foo/bar".