Download the PHP package bromine-mai/cor-yar without Composer

On this page you can find all versions of the php package bromine-mai/cor-yar. 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 cor-yar

Yar RPC框架PHP协程版本

提供不依赖拓展的客户端和服务端,含Yar服务协程化改造首选。

主要用于解决两个问题:

  1. 协程环境下,Yar RPC调用阻塞协程,STEAM HOOK可用前的协程解决方案
  2. Yar服务端 无法在Swoole Http Server中部署的问题。

项目API兼容原生拓展,可以轻松完成迁移。

安装

composer一键安装 composer require bromine-mai/cor-yar

然后在项目bootstrap中文件中 加载composer自带的psr类加载器即可

CorYar非常轻量,没有对Yar拓展的依赖,开箱即用。

Client使用

兼容原生Yar。未安装Yar的情况下仍能直接使用原生的Exception,配置常量等,使用方式和API参考官方文档即可。

底层会根据上下文自动使用同步,或者协程方式进行RPC调用,无需过多关注细节。 基本上替换Yar客户端就是一行use \BromineMai\CorYar\Client\Client as Yar_Client;的事

Server使用

由于原生Yar Server依赖SG(request_info)等全局变量,无法在Swoole Server环境下运行。

为了部署了Yar的服务迁移到Swoole上,同时提供Swoole版本的Yar_Server用于Swoole服务端。

SwooleServer与原生Server相比,需要在调用handle()前,额外的将swoole的$request, $response对象通过setIoHandler传给$server,其他使用方法和原生Yar一致。

如果你使用的Swoole框架屏蔽了底层细节,令你无法获取\Swoole\Http\Request,\Swoole\Http\Response变量,你也可以通过设置输入输出的回调方法代替setIoHandler()

CorYar也提供了更基础的\BromineMai\CorYar\Server\Server在非Swoole环境下,作为Yar原生服务端的替代。

依赖

PHP5.4+

CURL拓展 (非协程上下文)

Swoole4.0+ (协程上下文)

msgpack(如果指定了msgpack传输器)

其他

任何问题,随时提PR


All versions of cor-yar with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 bromine-mai/cor-yar contains the following files

Loading the files please wait ....