Skip to content

Commit

Permalink
tidied route parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjgreen committed Aug 9, 2014
1 parent 6ee1b40 commit b3abc18
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/Phroute/RouteParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class RouteParser {
\}\??~x";



const DEFAULT_DISPATCH_REGEX = '[^/]+';

private $parts;
Expand All @@ -45,7 +44,7 @@ public function parse($route)

if (!$matches = $this->extractVariableRouteParts($route))
{
return [[$this->quote($route)], $route];
return [[$route], $route];
}

foreach ($matches as $set) {
Expand Down Expand Up @@ -133,11 +132,4 @@ private function makeOptional($match)

return $match . '?';
}

private function quote($part)
{
return $part;
//return preg_quote($part, '~');
}

}

0 comments on commit b3abc18

Please sign in to comment.