Permalink
Browse files

Routing issue with installation in a sub-directory

ref: #7129
  • Loading branch information...
1 parent ae5b94f commit 8d9cd42acdc0baea285046428f7fcaf8da6909a2 @DHorchler DHorchler committed Feb 26, 2013
@@ -94,7 +94,7 @@ private function resolveParameters(RouteCollection $collection)
foreach ($route->getRequirements() as $name => $value) {
$route->setRequirement($name, $this->resolveString($value));
}
-
+ $collection->setPrefix('/'.ltrim($this->resolveString($collection->getPrefix()), '/'));
$route->setPattern($this->resolveString($route->getPattern()));
}
}
@@ -260,6 +260,16 @@ public function getPrefix()
}
/**
+ * Sets the prefix (used to resolve placeholders).
+ *
+ * @param string The prefix
+ */
+ public function setPrefix($prefix)
+ {
+ $this->prefix = $prefix;
+ }
+
+ /**
* Returns an array of resources loaded to build this collection.
*
* @return ResourceInterface[] An array of resources

0 comments on commit 8d9cd42

Please sign in to comment.