Matches a request against multiple routes.
Request $request: A Request object against which to match.
RouteCollection A RouteCollection of matched routes.
Overrides InitialMatcherInterface::matchRequestPartial
public function matchRequestPartial(Request $request) {
// For now for testing we'll just do a straight string match.
$path = $request
->getPathInfo();
$return = new RouteCollection();
foreach ($this->routes as $name => $route) {
if ($route
->getPattern() == $path) {
$return
->add($name, $route);
}
}
return $return;
}