Download the PHP package pachico/slim-swoole without Composer
On this page you can find all versions of the php package pachico/slim-swoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pachico/slim-swoole
More information about pachico/slim-swoole
Files in pachico/slim-swoole
Package slim-swoole
Short Description Convenient library to run SlimPHP applications with Swoole
License MIT
Homepage https://github.com/pachico/slim-swoole
Informations about the package slim-swoole
slim-swoole
This is a brige library to run Slim framework Slim framework applications using Swoole engine.
Overview
The main purpose of this library is to easily run your already existing SlimPHP applications using Swoole Framework. It requires you to bootstrap your application only once when you start Swoole HTTP server and, thanks to its event driven design, it will process each request reusing your already started application for better performance.
The execution sequence is as follows:
- You bootstrap your SlimPHP application as you would normally do.
- You instantiate the
BrigeManager
passing to it your SlimPHP application. - You start Swoole's HTTP server.
- You bind to the
on('request')
event handler theBridgeManager
instance which will:- Transform the Swoole request to a SlimPHP based on server and request attributes.
- Process your request through SlimPHP's application stack (including middlewares)
- Merge SlimPHP Response to Swoole Response
- End the request. All this is done under the hood, so you will just need to call:
(See usage paragraph for a complete example.)
Caution: it is still in development so any contribution and test will be more than welcome.
Requirements
- PHP-CLI >= 7.0 (Required by Swoole)
- Swoole framework (this has been tested with version 1.10.1)
Install
Via Composer
Usage
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.