File tree Expand file tree Collapse file tree 1 file changed +17
-23
lines changed Expand file tree Collapse file tree 1 file changed +17
-23
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ To make a console application, the bootstrap code would look like::
73
73
return new Application($kernel);
74
74
};
75
75
76
+
76
77
Selecting Runtimes
77
78
------------------
78
79
@@ -101,6 +102,22 @@ Use the ``APP_RUNTIME`` environment variable or by specifying the
101
102
}
102
103
}
103
104
105
+ If modifying the runtime class is not enough, you can always create your own runtime
106
+ template:
107
+
108
+ .. code-block :: json
109
+
110
+ {
111
+ "require" : {
112
+ "..." : " ..."
113
+ },
114
+ "extra" : {
115
+ "runtime" : {
116
+ "autoload_template" : " resources/runtime/autoload_runtime.template"
117
+ }
118
+ }
119
+ }
120
+
104
121
Using the Runtime
105
122
-----------------
106
123
@@ -483,28 +500,5 @@ The end user will now be able to create front controller like::
483
500
return new SomeCustomPsr15Application();
484
501
};
485
502
486
- Create Your Own Runtime Template
487
- --------------------------------
488
-
489
- In some cases the default generic runtime template generated (`vendor/autoload_runtime.php `)
490
- file is not enough. For example: you want to use a different entry point than
491
- `$_SERVER['FILE_SCRIPTNAME'] ` or a different SAPI than the traditional `cli `,
492
- `phpdbg ` or `embed `.
493
-
494
- To use your own template, you can register it as follows:
495
-
496
- .. code-block :: json
497
-
498
- {
499
- "require" : {
500
- "..." : " ..."
501
- },
502
- "extra" : {
503
- "runtime" : {
504
- "autoload_template" : " resources/runtime/autoload_runtime.template"
505
- }
506
- }
507
- }
508
-
509
503
.. _ReactPHP : https://reactphp.org/
510
504
.. _`PSR-15` : https://www.php-fig.org/psr/psr-15/
You can’t perform that action at this time.
0 commit comments