29
29
Converting from HttpFoundation Objects to PSR-7
30
30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
31
32
- The bridge provides an interface of a factory called
33
- :class: ` Symfony \\ Bridge \\ PsrHttpMessage \\ HttpMessageFactoryInterface `
34
- that builds objects implementing PSR-7 interfaces from HttpFoundation objects.
32
+ The bridge provides an interface of a factory called
33
+ ` HttpMessageFactoryInterface `_ that builds objects implementing PSR-7
34
+ interfaces from HttpFoundation objects.
35
35
36
36
The following code snippet explains how to convert a :class: `Symfony\\ Component\\ HttpFoundation\\ Request `
37
37
to a ``Nyholm\Psr7\ServerRequest `` class implementing the
@@ -66,8 +66,8 @@ Converting Objects implementing PSR-7 Interfaces to HttpFoundation
66
66
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67
67
68
68
On the other hand, the bridge provide a factory interface called
69
- :class: ` Symfony \\ Bridge \\ PsrHttpMessage \\ HttpFoundationFactoryInterface `
70
- that builds HttpFoundation objects from objects implementing PSR-7 interfaces.
69
+ ` HttpFoundationFactoryInterface `_ that builds HttpFoundation objects from
70
+ objects implementing PSR-7 interfaces.
71
71
72
72
The next snippet explain how to convert an object implementing the
73
73
``Psr\Http\Message\ServerRequestInterface `` interface to a
@@ -93,3 +93,5 @@ to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
93
93
.. _`PSR-7` : https://www.php-fig.org/psr/psr-7/
94
94
.. _`PSR-17` : https://www.php-fig.org/psr/psr-17/
95
95
.. _`libraries that implement psr/http-factory-implementation` : https://packagist.org/providers/psr/http-factory-implementation
96
+ .. _`HttpMessageFactoryInterface` : https://github.com/symfony/psr-http-message-bridge/blob/main/HttpMessageFactoryInterface.php
97
+ .. _`HttpFoundationFactoryInterface` : https://github.com/symfony/psr-http-message-bridge/blob/main/HttpFoundationFactoryInterface.php
0 commit comments