Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP JSON-RPC 2.0 Server/Client Implementation
JavaScript PHP CSS
branch: master
Failed to load latest commit information.
doc + swagger support
generator + swagger support
src + swagger support
tests + swagger support
.gitignore Initial Commit
README.md + swagger support
composer.json + composer.json

README.md

eazy-jsonrpc

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Server

SMD Schema available via /server.php?smd

Public Namespace

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

Multiple Namespaces

  • 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 <smd-file> <class-name>
  • Create client instance $client = <class-name>::GetInstance(); or $client = new <class-name>( <url> );
  • Use it $result = $client->Method(); :)

Doc

  • cd doc
  • php SmdToSwaggerConverter.php 'http://eazyjsonrpc/tests/example-server.php?smd&v2' eazyjsonrpc ../doc/swagger.json
  • open http://eazyjsonrpc/doc/
Something went wrong with that request. Please try again.