2017 © Pedro Peláez
 

library yii2-json-rpc

description

image

unlimix/yii2-json-rpc

description

  • Tuesday, June 9, 2015
  • by unlimix
  • Repository
  • 1 Watchers
  • 1 Stars
  • 379 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 20 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

JsonRpc Server and Client for Yii2, (*1)

Usage Server

1) Install with Composer, (*2)

"require": {
    "unlimix/yii2-json-rpc": "dev-master",
},

php composer.phar update

2) Add action to controller, (*3)

public function actions()
{
    return array(
        'index' => array(
            'class' => '\unlimix\jsonRpc\Action',
        ),
    );
}

public function sum($a, $b) {
    return $a + $b;
}

3) TEST:, (*4)

function sendRPC(){
        $.ajax({
            url: 'YOUR URL',
            data: JSON.stringify({
                "jsonrpc": "2.0",
                "id": '',
                "method": "sum",
                "params": [1, 2]
            }),
            type: 'POST',
            dataType: 'JSON',
            contentType: 'application/json-rpc',
            complete: function (xhr, status) {
                console.log(xhr);
                console.log(status);
            }
        });
    }

4) Enjoy!, (*5)

The Versions

09/06 2015

dev-master

9999999-dev

description

  Sources   Download

The Requires

 

by morgan

14/11 2014

v1.1.4

1.1.4.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

json yii2 yii jsonrpc rpc

06/11 2013

v1.1.3

1.1.3.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

json yii2 yii jsonrpc rpc

06/11 2013

v1.1.2

1.1.2.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

json yii2 yii jsonrpc rpc

04/11 2013

v1.1.1

1.1.1.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

json yii2 yii jsonrpc rpc

24/10 2013

v1.1.0

1.1.0.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

json yii2 yii jsonrpc rpc

02/10 2013

v1.0.3

1.0.3.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

by Alex Sharov

json yii2 yii jsonrpc rpc

20/09 2013

v1.0.2

1.0.2.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

by Alex Sharov

json yii2 yii jsonrpc rpc

15/09 2013

v1.0.1

1.0.1.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

by Alex Sharov

json yii2 yii jsonrpc rpc

14/09 2013

v1.0.0

1.0.0.0

A lightweight JsonRpc Server and Client for PHP

  Sources   Download

BSD-3-Clause

by Alex Sharov

json yii2 yii jsonrpc rpc