Skip to content

Commit 1bd2602

Browse files
committed
[#7663] update the PHP example code
1 parent 07cd41a commit 1bd2602

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

routing/hostname_pattern.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,8 @@ You can also set the host option on imported routes:
260260
261261
.. code-block:: php
262262
263-
use Symfony\Component\Routing\RouteCollection;
264-
265-
$importedCollection = $loader->import("@AcmeHelloBundle/Resources/config/routing.php");
266-
$importedCollection->setHost('hello.example.com');
267-
268-
$collection = new RouteCollection();
269-
$collection->addCollection($importedCollection);
263+
$collection = $loader->import("@AcmeHelloBundle/Resources/config/routing.php");
264+
$collection->setHost('hello.example.com');
270265
271266
return $collection;
272267

0 commit comments

Comments
 (0)