@@ -16,43 +16,6 @@ what URL it should use when generating URLs.
16
16
There are two ways of configuring the request context: at the application level
17
17
and per Command.
18
18
19
- Configuring the Request Context globally
20
- ----------------------------------------
21
-
22
- To configure the Request Context - which is used by the URL Generator - you can
23
- redefine the parameters it uses as default values to change the default host
24
- (localhost) and scheme (http). Note that this does not impact URLs generated
25
- via normal web requests, since those will override the defaults.
26
-
27
- .. configuration-block ::
28
-
29
- .. code-block :: yaml
30
-
31
- # app/config/parameters.yml
32
- parameters :
33
- router.request_context.host : example.org
34
- router.request_context.scheme : https
35
-
36
- .. code-block :: xml
37
-
38
- <!-- app/config/parameters.xml -->
39
- <?xml version =" 1.0" encoding =" UTF-8" ?>
40
-
41
- <container xmlns =" http://symfony.com/schema/dic/services"
42
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
43
-
44
- <parameters >
45
- <parameter key =" router.request_context.host" >example.org</parameter >
46
- <parameter key =" router.request_context.scheme" >https</parameter >
47
- </parameters >
48
- </container >
49
-
50
- .. code-block :: php
51
-
52
- // app/config/config_test.php
53
- $container->setParameter('router.request_context.host', 'example.org');
54
- $container->setParameter('router.request_context.scheme', 'https');
55
-
56
19
Configuring the Request Context per Command
57
20
-------------------------------------------
58
21
0 commit comments