2017 © Pedro Peláez
 

cakephp-plugin cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

image

hecsedli/cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

  • Thursday, May 24, 2018
  • by hecsedli
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

CakePHP 3.x JSON-RPC server, (*1)

Original idea: James Watts https://github.com/jameswatts/cake-jsonrpc, (*2)

Requirements

  • CakePHP 3.6+
  • PHP 5.6+

Installation

You can install using composer., (*3)

composer require hecsedli/cakephpjsonrpcserver
// config/bootstrap.php

Plugin::load('JSONRPCServer', ['bootstrap' => true]);

Implementation

Add the component to your controller, (*4)

public $components = ["JSONRPCServer.JsonrpcServer"];
public function user($request) {
    if (isset($request->params->userId)) {
        return $this->User->findById($request->params->userId);
    } else {
        throw new Exception('No user ID was specified', 123);
    }
);

JSON request, (*5)

{
    "jsonrpc": "2.0", 
    "method": "user", 
    "params": {
        "userId": 5
    }, 
    "id": "test"
}

The Versions

24/05 2018

dev-master

9999999-dev https://github.com/hecsedli/cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

  Sources   Download

MIT

The Requires

 

The Development Requires

by Csipke Ferenc

plugin json cakephp

24/05 2018

0.3

0.3.0.0 https://github.com/hecsedli/cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

  Sources   Download

MIT

The Requires

 

The Development Requires

by Csipke Ferenc

plugin json cakephp

24/05 2018

0.2

0.2.0.0 https://github.com/hecsedli/cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

  Sources   Download

MIT

The Requires

 

The Development Requires

by Csipke Ferenc

plugin json cakephp

24/05 2018

0.1

0.1.0.0 https://github.com/hecsedli/cakephpjsonrpcserver

CakePHP 3.x JSON-RPC server

  Sources   Download

MIT

The Requires

 

The Development Requires

by Csipke Ferenc

plugin json cakephp