https://github.com/indragunawan/swoole-http-message-bridge
Provides integration Swoole Http Request / Response to Symfony Request / Response.
https://github.com/indragunawan/swoole-http-message-bridge
swoole swoole-http symfony-bridge
Last synced: 19 days ago
JSON representation
Provides integration Swoole Http Request / Response to Symfony Request / Response.
- Host: GitHub
- URL: https://github.com/indragunawan/swoole-http-message-bridge
- Owner: IndraGunawan
- License: mit
- Created: 2018-01-25T10:10:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T16:21:31.000Z (about 5 years ago)
- Last Synced: 2025-04-17T17:17:43.921Z (about 1 month ago)
- Topics: swoole, swoole-http, symfony-bridge
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swoole Http Message Bridge
[](https://github.com/IndraGunawan/swoole-http-message-bridge/blob/master/LICENSE)
[](https://github.com/IndraGunawan/swoole-http-message-bridge)
[](https://packagist.org/packages/indragunawan/swoole-http-message-bridge)
[](https://travis-ci.org/IndraGunawan/swoole-http-message-bridge)Provides integration Swoole Http Request / Response to Symfony Request / Response.
## Installation
Require the package with composer. (`indragunawan/api-rate-limit-bundle` on [Packagist](https://packagist.org/packages/indragunawan/swoole-http-message-bridge));
```bash
composer require indragunawan/swoole-http-message-bridge
```## Usage
### Symfony Request and Response
```php
on('request', function (swoole_http_request $request, swoole_http_response $response) {
$sfRequest = Request::createFromSwooleRequest($request);
// ...
// $sfResponse = run_something_here that return Symfony response
Response::writeSwooleResponse($response, $sfResponse);
// ...
$response->end();
});$http->start();
```