Download the PHP package gudongkun/lswoole without Composer

On this page you can find all versions of the php package gudongkun/lswoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lswoole

lswoole

一、说明

lswoole 是用swoole来加速lumen的http服务器;

基于php7 lumen 7 和 swoole 4.0+;

由于代码只被加载解析一次,基本免除了lumen框架,运行效率低的问题;

由于本人水平有限,难免出现纰漏,欢迎大家指正和提出宝贵意见。

邮箱:[email protected]

作者:gudk

二、使用

(1)安装软件包:

(2)修改{项目目录}/bootstrap/app.php文件添加:

(3)添加配置文件:{项目目录}/config/swoole.php

(4)执行命令开启服务

(5)路由示例

三、session

swoole的session功能需要自己实现,lumen 实现了自己的session功能,但是默认没有开启。可以使用以下方式开启。

注意:swoole 并不支持$_SESSION超全局变量,本身也不建议我们创建超全局变量,lswoole中开启session后需要用,lumen方式使用session

(1)修改{项目目录}/bootstrap/app.php文件添加:

(2)添加配置文件:{项目目录}/config/session.php

(4)使用

四、优势

兼容lumen :结构简单对lumen的侵入小,原来nginx+fpm方式开发的lumen代码基本无需修改。

效率高:完全遵从 swoole4.0的最新开发标准,代码只被实例化一次,其他运行期间都是通过,copy原型的方式

容易扩展:本代码结构简单,只有五个类,主逻辑的处理更是只有LSwooleServer一个类。代码逻辑非常清晰简单。方便大家扩展自己的功能。

swoole进入4.0以后,添加了很多功能,很多逻辑的处理也已经变成对开发者透明,本项目充分利用了这些特性,避免了充分造轮子的过程。

侵入性小:lumen进入7.0以后,有很多性能和结构上的优化和改变,使得一些老的代码出现了兼容性问题,或者为了比较好的兼容性。采用了大量复杂结构如事件等,导致代码复杂,运行效率低下。

本项目根据最新的 lumen7.0+和swoole4.0+,用最简单最直接方式引入swoole(其中包含的是作者大量肝代码,如果觉得本项目有用请不吝点赞)

五、测试

项目中有完整的单元测试。执行方式如下

六、原理


All versions of lswoole with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gudongkun/lswoole contains the following files

Loading the files please wait ...