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

Commit9c30509

Browse files
committed
The host parameter has to be in defaults, not requirements
1 parent876994a commit9c30509

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎components/routing/hostname_pattern.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ instance, if you want to match both ``m.example.com`` and
194194
mobile_homepage:
195195
path:/
196196
host:"m.{domain}"
197-
defaults:{ _controller: AcmeDemoBundle:Main:mobileHomepage }
198-
requirements:
197+
defaults:
198+
_controller:AcmeDemoBundle:Main:mobileHomepage
199199
domain:"%domain%"
200200
201201
homepage:
@@ -212,7 +212,7 @@ instance, if you want to match both ``m.example.com`` and
212212
213213
<routeid="mobile_homepage"path="/"host="m.example.com">
214214
<defaultkey="_controller">AcmeDemoBundle:Main:mobileHomepage</default>
215-
<requirementkey="domain">%domain%</requirement>
215+
<defaultkey="domain">%domain%</requirement>
216216
</route>
217217
218218
<routeid="homepage"path="/">
@@ -228,8 +228,8 @@ instance, if you want to match both ``m.example.com`` and
228228
$collection = new RouteCollection();
229229
$collection->add('mobile_homepage', new Route('/', array(
230230
'_controller' => 'AcmeDemoBundle:Main:mobileHomepage',
231-
), array(
232231
'domain' => '%domain%',
232+
), array(
233233
), array(), 'm.{domain}'));
234234
235235
$collection->add('homepage', new Route('/', array(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp