some small refactorings and cleanup.

This commit is contained in:
Taylor Otwell
2011-10-22 23:25:07 -05:00
parent b71ecb4363
commit 32989d39c8
9 changed files with 45 additions and 51 deletions

View File

@@ -153,6 +153,7 @@ class Router {
foreach (explode(', ', $keys) as $key)
{
// Append the provided formats to the route as an optional regular expression.
// This should make the route look something like: "user(\.(json|xml|html))?"
if ( ! is_null($formats = $this->provides($callback)))
{
$key .= '(\.('.implode('|', $formats).'))?';