Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added defaults and requirements to setHostenamePattern to be consiste…

…nt with addPrefix which also accepts placeholders with defaults and requirements
  • Loading branch information...
commit 36abbd6cfb6ef7537ea2d1877a4cceef0b951707 1 parent b4ea9bf
@Tobion authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/Symfony/Component/Routing/RouteCollection.php
View
8 src/Symfony/Component/Routing/RouteCollection.php
@@ -252,12 +252,16 @@ public function getPrefix()
/**
* Sets the hostname pattern on all routes.
*
- * @param string $pattern The pattern
+ * @param string $pattern The pattern
+ * @param array $defaults An array of default values
+ * @param array $requirements An array of requirements
*/
- public function setHostnamePattern($pattern)
+ public function setHostnamePattern($pattern, array $defaults = array(), array $requirements = array())
{
foreach ($this->routes as $route) {
$route->setHostnamePattern($pattern);
+ $route->addDefaults($defaults);
+ $route->addRequirements($requirements);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.