Download the PHP package lumening/lumen-hprose without Composer

On this page you can find all versions of the php package lumening/lumen-hprose. 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 lumen-hprose

Lumen-hprose

基于 hprose/hprose-php 开发的Lumen/Laravel扩展:Lumen-hprose 参考:Laravel-hprose

开发背景:最近打算使用lumen框架做rpc的功能,于是在网上找是否有相关的拓展,于是找到了Laravel-hprose,本打算直接用于 lumen 但尝试后发现laravel的不能完全与lumen兼容,于是根据Laravel-hprose 修改 得到 Lumen-hprose,同时兼容lumen 和 laravel。

版本要求

安装

直接使用

如果上面不行,那么 编辑composer.json

然后执行

使用laravel配置

  1. 在 config/app.php 注册 ServiceProvider 和 Facade (Laravel 5.5 无需手动注册)

  2. 配置.env文件 监听地址列表,字符串json格式数组

    是否启用demo方法,true开启 false关闭,开启后将自动对外发布一个远程调用方法 demo 客户端可调用:$client->demo()

  3. 创建配置路由文件:

    应用根目录下的config目录下会自动生成新文件hprose.php

    应用根目录下的routes目录下会自动生成新文件rpc.php

使用lumen配置

  1. 在 bootstrap/app.php 注册 ServiceProvider 和 Facade

  2. 在 app/Console/Kernel.php 添加 vendor publish

  3. 配置.env文件 监听地址列表,字符串json格式数组

    是否启用demo方法,true开启 false关闭,开启后将自动对外发布一个远程调用方法 demo 客户端可调用:$client->demo()

  4. 创建配置路由文件:

    应用根目录下的config目录下会自动生成新文件hprose.php

    应用根目录下的routes目录下会自动生成新文件rpc.php

使用

路由

laravel 路由的用法相似,基于 dingo/api 的路由代码上做了简单修改

路由文件

添加路由方法

发布远程调用方法 getUserByNameupdate

控制器

客户端调用 客户端可以只安装 Hprose

路由组

客户端调用

前缀

客户端调用

如果服务端出现 exception ,因为hprose 没有返回code(已经和开发者确认),需要将code 合并到message用json方式包裹返回

启动服务

更新了路由后需要重新启动服务


All versions of lumen-hprose with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
hprose/hprose Version v2.0.*
laravelista/lumen-vendor-publish Version ^2.1
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 lumening/lumen-hprose contains the following files

Loading the files please wait ....