Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17f51a1

Browse files
committed
Merge pull request#6 from Tobion/hostname-routes
fix API of RouteCollection
2 parents26e5684 +e120a7a commit17f51a1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/Symfony/Component/Routing/RouteCollection.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ public function addCollection(RouteCollection $collection, $prefix = '', $defaul
212212
// necessarily already have it applied (depending on the order RouteCollections are added to each other)
213213
$collection->addPrefix($this->getPrefix() .$prefix,$defaults,$requirements,$options);
214214

215-
$collection->setHostnamePattern($hostnamePattern);
215+
if ('' !==$hostnamePattern) {
216+
$collection->setHostnamePattern($hostnamePattern);
217+
}
216218

217219
$this->routes[] =$collection;
218220
}
@@ -284,10 +286,6 @@ public function setHostnamePattern($pattern)
284286
{
285287
$this->hostnamePattern = (string)$pattern;
286288

287-
if ('' ===$pattern) {
288-
return;
289-
}
290-
291289
foreach ($this->routesas$name =>$route) {
292290
$route->setHostnamePattern($pattern);
293291
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp