Added RoutePartialGroup support.

This commit is contained in:
Simon Sessingø
2017-09-03 18:24:51 +01:00
parent 7f924c7d0a
commit a5aac57ce9
7 changed files with 82 additions and 20 deletions
+3 -11
View File
@@ -48,17 +48,9 @@ class RouteGroup extends Route implements IGroupRoute
*/
public function matchRoute($url, Request $request)
{
if ($this->prefix !== null) {
/* Parse parameters from current route */
$parameters = $this->parseParameters($this->prefix, $url);
/* If no custom regular expression or parameters was found on this route, we stop */
if ($parameters === null) {
return false;
}
/* Set the parameters */
$this->setParameters((array)$parameters);
/* Skip if prefix doesn't match */
if ($this->prefix !== null && stripos($url, $this->prefix) === false) {
return false;
}
return $this->matchDomain($request);