Skip to content

Commit 5f2ed4b

Browse files
committed
[Runtime] Document registering your own runtime template
1 parent d1522a7 commit 5f2ed4b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

components/runtime.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,5 +483,28 @@ The end user will now be able to create front controller like::
483483
return new SomeCustomPsr15Application();
484484
};
485485

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+
486509
.. _ReactPHP: https://reactphp.org/
487510
.. _`PSR-15`: https://www.php-fig.org/psr/psr-15/

0 commit comments

Comments
 (0)