2017 © Pedro Peláez
 

library eazy-jsonrpc

PHP JSON-RPC 2.0 Server/Client Implementation with SMD & Swagger support

image

sergeyfast/eazy-jsonrpc

PHP JSON-RPC 2.0 Server/Client Implementation with SMD & Swagger support

  • Friday, April 1, 2016
  • by sergeyfast
  • Repository
  • 8 Watchers
  • 50 Stars
  • 18,746 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 3 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

eazy-jsonrpc

Latest Version Total Downloads, (*1)

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD, (*2)

Server

SMD Schema available via /server.php?smd, (*3)

Public Namespace, (*4)

  • Inherits your exposed class from BaseJsonRpcServer or create new BaseJsonRpcServer( $instance );
  • $server->Execute();

Multiple Namespaces, (*5)

  • Create new BaseJsonRpcServer();
  • Call $server->RegisterInstance( $instance, $namespace ) as many times as you need
  • $server->Execute();

Client

  • Generate Client from SMD Schema from generator/ php JsonRpcClientGenerator.php <smd-file> <class-name>
  • Use it:
$client = <class-name>::GetInstance(<url>);

try {  
  $result = $client->Method(); 
} catch (BaseJsonRpcException $e) {
  // work with exception
}

Client with typed returns by rpcgen

  • Generate Client from SMD Schema with rpcgen and save it to RpcClient.php
  • Use it:
$client = RpcClient::GetInstance(<url>);

try {  
  $result = $client->Method(); 
} catch (BaseJsonRpcException $e) {
  // work with exception
}

Doc

  • cd generator
  • php SmdToSwaggerConverter.php 'http://eazyjsonrpc/tests/example-server.php?smd' eazyjsonrpc ../doc/swagger.json
  • open http://eazyjsonrpc/doc/

The Versions

01/04 2016

dev-shuler_response

dev-shuler_response https://github.com/sergeyfast/eazy-jsonrpc/

PHP JSON-RPC 2.0 Server/Client Implementation with SMD & Swagger support

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Sergey Bykov

json-rpc jsonrpc jsonrpc2 rpc2 smd json rpc 2

24/07 2015

dev-master

9999999-dev https://github.com/sergeyfast/eazy-jsonrpc/

PHP JSON-RPC 2.0 Server/Client Implementation with SMD & Swagger support

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Sergey Bykov

json-rpc jsonrpc jsonrpc2 rpc2 smd json rpc 2