2017 © Pedro Peláez
 

library reactive-slim

A bridge to use SlimPHP within ReactPHP

image

nigelgreenway/reactive-slim

A bridge to use SlimPHP within ReactPHP

  • Thursday, June 8, 2017
  • by NigelGreenway
  • Repository
  • 3 Watchers
  • 19 Stars
  • 140 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 6 Open issues
  • 9 Versions
  • 31 % Grown

The README.md

Latest Version Software License ![Build Status][ico-travis] Total Downloads, (*1)

README

Reactive Slim is a bridge where you can pass your Slim instance and reap the benefit's of ReactPHP's event driven, non-blocking I/O usage of PHP., (*2)

The implementation run's on PHP7.0 and makes good use of PHP's Scalar Type hints., (*3)

Installation

composer require nigelgreenway/reactive-slim, (*4)

Usage

After creating your Slim Instance, pass it to the following construction:, (*5)

(new \ReactiveSlim\Server($slimInstance))
    ->run();

Please see the examples for more information or run php ./example/app-dev-mode.php., (*6)

If are you are running via PHP locally, you are able to pass the following flags to customise both the host and the port:, (*7)

-h 0.0.0.0 or --host=0.0.0.0 and -p 8686 or --port=8686, (*8)

Restarting your ReactApp

There are 3 ways to restart your application (only tested on Linux - Solus, kernel 4.9.30-29.lts currently):, (*9)

  • sh ./.tools/local-watch runs via local PHP installation (requires inotify-tools to be installed via package manager)
  • sh ./.tools/reactor run via local PHP installation and requires the reactor.config.json config
  • sh ./.tools/docker-watch run the app within a Docker container (requires inotify-tools to be installed via package manager)

Extra options

#withHost(<string>) - The default host URL is 0.0.0.0 but is overridden by passing a string as the parameter, (*10)

#withPort(<int>) - The default port is 1337 but is overridden by passing an integer as the parameter, (*11)

#withEnvironment(<int>) - The default is 0 which is the Production environment, the full options are:, (*12)

  • ServerEnvironment::PRODUCTION (0)
  • ServerEnvironment::STAGING (1)
  • ServerEnvironment::TESTING (2)
  • ServerEnvironment::DEVELOPMENT (3)

Change log

Please see CHANGELOG for more information on what has changed recently., (*13)

Testing

bash $ composer test, (*14)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*15)

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker., (*16)

Credits

This has been created to plug two great packages together: - SlimPHP - ReactPHP, (*17)

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

08/06 2017

dev-master

9999999-dev

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

08/06 2017

v0.3.2

0.3.2.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

08/06 2017

dev-fix/cookie-parser-wrongly-implemented

dev-fix/cookie-parser-wrongly-implemented

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

07/06 2017

v0.3.1

0.3.1.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

07/06 2017

dev-fix/general-fixes

dev-fix/general-fixes

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

04/06 2017

v0.3.0

0.3.0.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

23/05 2017

v0.2.0

0.2.0.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

17/05 2017

v0.1.1

0.1.1.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server

17/05 2017

v0.1.0

0.1.0.0

A bridge to use SlimPHP within ReactPHP

  Sources   Download

The Requires

 

The Development Requires

php php7 event loop slimphp reactphp php webserver slim bridge reactphp slim bridge slimphp bridge reactphp server php server