8000 The host parameter has to be in defaults, not requirements by MarieMinasyan · Pull Request #3368 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

The host parameter has to be in defaults, not requirements #3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
The host parameter has to be in defaults, not requirements
  • Loading branch information
MarieMinasyan committed Dec 19, 2013
commit 9c305090b911dc07dd120dde33b3ae5793aaeda5
8 changes: 4 additions & 4 deletions components/routing/hostname_pattern.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ instance, if you want to match both ``m.example.com`` and
mobile_homepage:
path: /
host: "m.{domain}"
defaults: { _controller: AcmeDemoBundle:Main:mobileHomepage }
requirements:
defaults:
_controller: AcmeDemoBundle:Main:mobileHomepage
domain: "%domain%"

homepage:
Expand All @@ -212,7 +212,7 @@ instance, if you want to match both ``m.example.com`` and

<route id="mobile_homepage" path="/" host="m.example.com">
<default key="_controller">AcmeDemoBundle:Main:mobileHomepage</default>
<requirement key="domain">%domain%</requirement>
<default key="domain">%domain%</requirement>
</route>

<route id="homepage" path="/">
Expand All @@ -228,8 +228,8 @@ instance, if you want to match both ``m.example.com`` and
$collection = new RouteCollection();
$collection->add('mobile_homepage', new Route('/', array(
'_controller' => 'AcmeDemoBundle:Main:mobileHomepage',
), array(
'domain' => '%domain%',
), array(
), array(), 'm.{domain}'));

$collection->add('homepage', new Route('/', array(
Expand Down
0