Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mumtazhaqiqy/ci4-psr7-http-messages
This package convert codeigniter4-http object from and to objects implementing HTTP message interfaces defined by PSR-7.
https://github.com/mumtazhaqiqy/ci4-psr7-http-messages
codeigniter4 http-messages psr-7
Last synced: about 2 months ago
JSON representation
This package convert codeigniter4-http object from and to objects implementing HTTP message interfaces defined by PSR-7.
- Host: GitHub
- URL: https://github.com/mumtazhaqiqy/ci4-psr7-http-messages
- Owner: mumtazhaqiqy
- License: other
- Created: 2022-04-09T12:55:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T21:37:33.000Z (almost 3 years ago)
- Last Synced: 2024-11-14T14:47:15.933Z (2 months ago)
- Topics: codeigniter4, http-messages, psr-7
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CI4 PSR-7 HTTP Messages
This package convert codeigniter4-http object from and to objects implementing HTTP message interfaces defined by PSR-7.## Instalation
```sh
$ composer require mumtazhaqiqy/ci4-psr7-http-messages$ composer require nyholm/psr7
```## Usage
The bridge provides an interface of a factory called
``MumtazHaqiqy\Codeigniter4Psr7\Interfaces\HttpPsr7FactoryInterface``
that builds objects implementing PSR-7 interfaces from ``IncommingRequest`` objects.The following code snippet explains how to convert a ``CodeIgniter\HTTP\IncomingRequest``
to a ``Nyholm\Psr7\ServerRequest`` class implementing the
``Psr\Http\Message\ServerRequestInterface`` interface:```php
createRequest($requestCodeIgniter);
```