nigelgreenway/reactive-slim 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nigelgreenway/reactive-slim

Composer 安装命令:

composer require nigelgreenway/reactive-slim

包简介

A bridge to use SlimPHP within ReactPHP

README 文档

README

Latest Version Software License Build Status Total Downloads

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.

The implementation run's on PHP7.0 and makes good use of PHP's Scalar Type hints.

Installation

composer require nigelgreenway/reactive-slim

Usage

After creating your Slim Instance, pass it to the following construction:

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

Please see the examples for more information or run php ./example/app-dev-mode.php.

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

-h 0.0.0.0 or --host=0.0.0.0 and -p 8686 or --port=8686

Restarting your ReactApp

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

  • 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

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

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

  • 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.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

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

Credits

This has been created to plug two great packages together:

License

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

统计信息

  • 总下载量: 531
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 29
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 29
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-05-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固