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

Commit07cd41a

Browse files
committed
minor#7663 Update hostname_pattern.rst (krlove)
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes#7663).Discussion----------Update hostname_pattern.rst`Symfony\Component\Routing\RouteCollection::addCollection` accepts one argument of type `RouteCollection` that is why`$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com');` is not correct.Commits-------71dd533 Update hostname_pattern.rst
2 parents99247f7 +71dd533 commit07cd41a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎routing/hostname_pattern.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,11 @@ You can also set the host option on imported routes:
262262
263263
use Symfony\Component\Routing\RouteCollection;
264264
265+
$importedCollection = $loader->import("@AcmeHelloBundle/Resources/config/routing.php");
266+
$importedCollection->setHost('hello.example.com');
267+
265268
$collection = new RouteCollection();
266-
$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com');
269+
$collection->addCollection($importedCollection);
267270
268271
return $collection;
269272

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp