@@ -30,7 +30,6 @@ The Runtime component abstracts most bootstrapping logic as so-called
30
30
For instance, the Runtime component allows Symfony's ``public/index.php ``
31
31
to look like this::
32
32
33
- <?php
34
33
// public/index.php
35
34
use App\Kernel;
36
35
@@ -120,7 +119,6 @@ Resolvable Arguments
120
119
121
120
The closure returned from the front-controller may have zero or more arguments::
122
121
123
- <?php
124
122
// public/index.php
125
123
use Symfony\Component\Console\Input\InputInterface;
126
124
use Symfony\Component\Console\Output\OutputInterface;
@@ -167,7 +165,6 @@ Resolvable Applications
167
165
The application returned by the closure below is a Symfony Kernel. However,
168
166
a number of different applications are supported::
169
167
170
- <?php
171
168
// public/index.php
172
169
use App\Kernel;
173
170
@@ -187,7 +184,6 @@ The ``SymfonyRuntime`` can handle these applications:
187
184
The Response will be printed by
188
185
:class: `Symfony\\ Component\\ Runtime\\ Runner\\ Symfony\\ ResponseRunner `::
189
186
190
- <?php
191
187
// public/index.php
192
188
use Symfony\Component\HttpFoundation\Response;
193
189
@@ -201,8 +197,6 @@ The ``SymfonyRuntime`` can handle these applications:
201
197
To write single command applications. This will use the
202
198
:class: `Symfony\\ Component\\ Runtime\\ Runner\\ Symfony\\ ConsoleApplicationRunner `::
203
199
204
- <?php
205
-
206
200
use Symfony\Component\Console\Command\Command;
207
201
use Symfony\Component\Console\Input\InputInterface;
208
202
use Symfony\Component\Console\Output\OutputInterface;
@@ -221,8 +215,6 @@ The ``SymfonyRuntime`` can handle these applications:
221
215
Useful with console applications with more than one command. This will use the
222
216
:class: `Symfony\\ Component\\ Runtime\\ Runner\\ Symfony\\ ConsoleApplicationRunner `::
223
217
224
- <?php
225
-
226
218
use Symfony\Component\Console\Application;
227
219
use Symfony\Component\Console\Command\Command;
228
220
use Symfony\Component\Console\Input\InputInterface;
@@ -250,7 +242,6 @@ applications:
250
242
The ``RunnerInterface `` is a way to use a custom application with the
251
243
generic Runtime::
252
244
253
- <?php
254
245
// public/index.php
255
246
use Symfony\Component\Runtime\RunnerInterface;
256
247
@@ -271,9 +262,7 @@ applications:
271
262
Your "application" can also be a ``callable ``. The first callable will return
272
263
the "application" and the second callable is the "application" itself::
273
264
274
- <?php
275
265
// public/index.php
276
-
277
266
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
278
267
279
268
return function () {
@@ -290,8 +279,6 @@ applications:
290
279
If the callable doesn't return anything, the ``SymfonyRuntime `` will assume
291
280
everything is fine::
292
281
293
- <?php
294
-
295
282
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
296
283
297
284
return function () {
@@ -304,8 +291,6 @@ Using Options
304
291
Some behavior of the Runtimes can be modified through runtime options. They
305
292
can be set using the ``APP_RUNTIME_OPTIONS `` environment variable::
306
293
307
- <?php
308
-
309
294
$_SERVER['APP_RUNTIME_OPTIONS'] = [
310
295
'project_dir' => '/var/task',
311
296
];
@@ -496,8 +481,6 @@ always using this ``ReactPHPRunner``::
496
481
497
482
The end user will now be able to create front controller like::
498
483
499
- <?php
500
-
501
484
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
502
485
503
486
return function (array $context) {
0 commit comments