@@ -10,8 +10,8 @@ You can also match on the HTTP *host* of the incoming request.
10
10
11
11
.. code-block :: php-annotations
12
12
13
- // src/Acme/DemoBundle /Controller/MainController.php
14
- namespace Acme\DemoBundle \Controller;
13
+ // src/AppBundle /Controller/MainController.php
14
+ namespace AppBundle \Controller;
15
15
16
16
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
17
17
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
@@ -40,11 +40,11 @@ You can also match on the HTTP *host* of the incoming request.
40
40
mobile_homepage :
41
41
path : /
42
42
host : m.example.com
43
- defaults : { _controller: AcmeDemoBundle :Main:mobileHomepage }
43
+ defaults : { _controller: AppBundle :Main:mobileHomepage }
44
44
45
45
homepage :
46
46
path : /
47
- defaults : { _controller: AcmeDemoBundle :Main:homepage }
47
+ defaults : { _controller: AppBundle :Main:homepage }
48
48
49
49
.. code-block :: xml
50
50
@@ -55,11 +55,11 @@ You can also match on the HTTP *host* of the incoming request.
55
55
http://symfony.com/schema/routing/routing-1.0.xsd" >
56
56
57
57
<route id =" mobile_homepage" path =" /" host =" m.example.com" >
58
- <default key =" _controller" >AcmeDemoBundle :Main:mobileHomepage</default >
58
+ <default key =" _controller" >AppBundle :Main:mobileHomepage</default >
59
59
</route >
60
60
61
61
<route id =" homepage" path =" /" >
62
- <default key =" _controller" >AcmeDemoBundle :Main:homepage</default >
62
+ <default key =" _controller" >AppBundle :Main:homepage</default >
63
63
</route >
64
64
</routes >
65
65
@@ -70,11 +70,11 @@ You can also match on the HTTP *host* of the incoming request.
70
70
71
71
$collection = new RouteCollection();
72
72
$collection->add('mobile_homepage', new Route('/', array(
73
- '_controller' => 'AcmeDemoBundle :Main:mobileHomepage',
73
+ '_controller' => 'AppBundle :Main:mobileHomepage',
74
74
), array(), array(), 'm.example.com'));
75
75
76
76
$collection->add('homepage', new Route('/', array(
77
- '_controller' => 'AcmeDemoBundle :Main:homepage',
77
+ '_controller' => 'AppBundle :Main:homepage',
78
78
)));
79
79
80
80
return $collection;
@@ -92,8 +92,8 @@ you can use placeholders in your hostname:
92
92
93
93
.. code-block :: php-annotations
94
94
95
- // src/Acme/DemoBundle /Controller/MainController.php
96
- namespace Acme\DemoBundle \Controller;
95
+ // src/AppBundle /Controller/MainController.php
96
+ namespace AppBundle \Controller;
97
97
98
98
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
99
99
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
@@ -122,11 +122,11 @@ you can use placeholders in your hostname:
122
122
projects_homepage :
123
123
path : /
124
124
host : " {project_name}.example.com"
125
- defaults : { _controller: AcmeDemoBundle :Main:projectsHomepage }
125
+ defaults : { _controller: AppBundle :Main:projectsHomepage }
126
126
127
127
homepage :
128
128
path : /
129
- defaults : { _controller: AcmeDemoBundle :Main:homepage }
129
+ defaults : { _controller: AppBundle :Main:homepage }
130
130
131
131
.. code-block :: xml
132
132
@@ -137,11 +137,11 @@ you can use placeholders in your hostname:
137
137
http://symfony.com/schema/routing/routing-1.0.xsd" >
138
138
139
139
<route id =" projects_homepage" path =" /" host =" {project_name}.example.com" >
140
- <default key =" _controller" >AcmeDemoBundle :Main:projectsHomepage</default >
140
+ <default key =" _controller" >AppBundle :Main:projectsHomepage</default >
141
141
</route >
142
142
143
143
<route id =" homepage" path =" /" >
144
- <default key =" _controller" >AcmeDemoBundle :Main:homepage</default >
144
+ <default key =" _controller" >AppBundle :Main:homepage</default >
145
145
</route >
146
146
</routes >
147
147
@@ -152,11 +152,11 @@ you can use placeholders in your hostname:
152
152
153
153
$collection = new RouteCollection();
154
154
$collection->add('project_homepage', new Route('/', array(
155
- '_controller' => 'AcmeDemoBundle :Main:projectsHomepage',
155
+ '_controller' => 'AppBundle :Main:projectsHomepage',
156
156
), array(), array(), '{project_name}.example.com'));
157
157
158
158
$collection->add('homepage', new Route('/', array(
159
- '_controller' => 'AcmeDemoBundle :Main:homepage',
159
+ '_controller' => 'AppBundle :Main:homepage',
160
160
)));
161
161
162
162
return $collection;
@@ -169,8 +169,8 @@ instance, if you want to match both ``m.example.com`` and
169
169
170
170
.. code-block :: php-annotations
171
171
172
- // src/Acme/DemoBundle /Controller/MainController.php
173
- namespace Acme\DemoBundle \Controller;
172
+ // src/AppBundle /Controller/MainController.php
173
+ namespace AppBundle \Controller;
174
174
175
175
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
176
176
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
@@ -206,14 +206,14 @@ instance, if you want to match both ``m.example.com`` and
206
206
path : /
207
207
host : " {subdomain}.example.com"
208
208
defaults :
209
- _controller : AcmeDemoBundle :Main:mobileHomepage
209
+ _controller : AppBundle :Main:mobileHomepage
210
210
subdomain : m
211
211
requirements :
212
212
subdomain : m|mobile
213
213
214
214
homepage :
215
215
path : /
216
- defaults : { _controller: AcmeDemoBundle :Main:homepage }
216
+ defaults : { _controller: AppBundle :Main:homepage }
217
217
218
218
.. code-block :: xml
219
219
@@ -224,13 +224,13 @@ instance, if you want to match both ``m.example.com`` and
224
224
http://symfony.com/schema/routing/routing-1.0.xsd" >
225
225
226
226
<route id =" mobile_homepage" path =" /" host =" {subdomain}.example.com" >
227
- <default key =" _controller" >AcmeDemoBundle :Main:mobileHomepage</default >
227
+ <default key =" _controller" >AppBundle :Main:mobileHomepage</default >
228
228
<default key =" subdomain" >m</default >
229
229
<requirement key =" subdomain" >m|mobile</requirement >
230
230
</route >
231
231
232
232
<route id =" homepage" path =" /" >
233
- <default key =" _controller" >AcmeDemoBundle :Main:homepage</default >
233
+ <default key =" _controller" >AppBundle :Main:homepage</default >
234
234
</route >
235
235
</routes >
236
236
@@ -241,14 +241,14 @@ instance, if you want to match both ``m.example.com`` and
241
241
242
242
$collection = new RouteCollection();
243
243
$collection->add('mobile_homepage', new Route('/', array(
244
- '_controller' => 'AcmeDemoBundle :Main:mobileHomepage',
244
+ '_controller' => 'AppBundle :Main:mobileHomepage',
245
245
'subdomain' => 'm',
246
246
), array(
247
247
'subdomain' => 'm|mobile',
248
248
), array(), '{subdomain}.example.com'));
249
249
250
250
$collection->add('homepage', new Route('/', array(
251
- '_controller' => 'AcmeDemoBundle :Main:homepage',
251
+ '_controller' => 'AppBundle :Main:homepage',
252
252
)));
253
253
254
254
return $collection;
@@ -262,8 +262,8 @@ instance, if you want to match both ``m.example.com`` and
262
262
263
263
.. code-block :: php-annotations
264
264
265
- // src/Acme/DemoBundle /Controller/MainController.php
266
- namespace Acme\DemoBundle \Controller;
265
+ // src/AppBundle /Controller/MainController.php
266
+ namespace AppBundle \Controller;
267
267
268
268
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
269
269
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
@@ -299,14 +299,14 @@ instance, if you want to match both ``m.example.com`` and
299
299
path : /
300
300
host : " m.{domain}"
301
301
defaults :
302
- _controller : AcmeDemoBundle :Main:mobileHomepage
302
+ _controller : AppBundle :Main:mobileHomepage
303
303
domain : ' %domain%'
304
304
requirements :
305
305
domain : ' %domain%'
306
306
307
307
homepage :
308
308
path : /
309
- defaults : { _controller: AcmeDemoBundle :Main:homepage }
309
+ defaults : { _controller: AppBundle :Main:homepage }
310
310
311
311
.. code-block :: xml
312
312
@@ -317,13 +317,13 @@ instance, if you want to match both ``m.example.com`` and
317
317
http://symfony.com/schema/routing/routing-1.0.xsd" >
318
318
319
319
<route id =" mobile_homepage" path =" /" host =" m.{domain}" >
320
- <default key =" _controller" >AcmeDemoBundle :Main:mobileHomepage</default >
320
+ <default key =" _controller" >AppBundle :Main:mobileHomepage</default >
321
321
<default key =" domain" >%domain%</default >
322
322
<requirement key =" domain" >%domain%</requirement >
323
323
</route >
324
324
325
325
<route id =" homepage" path =" /" >
326
- <default key =" _controller" >AcmeDemoBundle :Main:homepage</default >
326
+ <default key =" _controller" >AppBundle :Main:homepage</default >
327
327
</route >
328
328
</routes >
329
329
@@ -334,14 +334,14 @@ instance, if you want to match both ``m.example.com`` and
334
334
335
335
$collection = new RouteCollection();
336
336
$collection->add('mobile_homepage', new Route('/', array(
337
- '_controller' => 'AcmeDemoBundle :Main:mobileHomepage',
337
+ '_controller' => 'AppBundle :Main:mobileHomepage',
338
338
'domain' => '%domain%',
339
339
), array(
340
340
'domain' => '%domain%',
341
341
), array(), 'm.{domain}'));
342
342
343
343
$collection->add('homepage', new Route('/', array(
344
- '_controller' => 'AcmeDemoBundle :Main:homepage',
344
+ '_controller' => 'AppBundle :Main:homepage',
345
345
)));
346
346
347
347
return $collection;
@@ -363,8 +363,8 @@ You can also set the host option on imported routes:
363
363
364
364
.. code-block :: php-annotations
365
365
366
- // src/Acme/HelloBundle /Controller/MainController.php
367
- namespace Acme\HelloBundle \Controller;
366
+ // src/AppBundle /Controller/MainController.php
367
+ namespace AppBundle \Controller;
368
368
369
369
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
370
370
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
@@ -379,8 +379,8 @@ You can also set the host option on imported routes:
379
379
380
380
.. code-block :: yaml
381
381
382
- acme_hello :
383
- resource : ' @AcmeHelloBundle /Resources/config/routing.yml'
382
+ app_hello :
383
+ resource : ' @AppBundle /Resources/config/routing.yml'
384
384
host : " hello.example.com"
385
385
386
386
.. code-block :: xml
@@ -391,12 +391,12 @@ You can also set the host option on imported routes:
391
391
xsi : schemaLocation =" http://symfony.com/schema/routing
392
392
http://symfony.com/schema/routing/routing-1.0.xsd" >
393
393
394
- <import resource =" @AcmeHelloBundle /Resources/config/routing.xml" host =" hello.example.com" />
394
+ <import resource =" @AppBundle /Resources/config/routing.xml" host =" hello.example.com" />
395
395
</routes >
396
396
397
397
.. code-block :: php
398
398
399
- $collection = $loader->import("@AcmeHelloBundle /Resources/config/routing.php");
399
+ $collection = $loader->import("@AppBundle /Resources/config/routing.php");
400
400
$collection->setHost('hello.example.com');
401
401
402
402
return $collection;
0 commit comments