thefuzz69/yii2-json-rpc

A lightweight JsonRpc Server and Client for PHP (Fork of nizsheanez's yii2-json-rpc package)

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 210

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 21

Type:yii2-extension

v1.2 2014-11-13 15:25 UTC

This package is not auto-updated.

Last update: 2024-01-15 23:39:26 UTC


README

JsonRpc Server and Client for Yii2

##Usage Server

  1. Install with Composer
"require": {
    "thefuzz69/yii2-json-rpc": "*",
},

php composer.phar update
  1. Add action to controller
public function actions()
{
    return array(
        'index' => array(
            'class' => '\thefuzz69\JsonRpc\Action',
        ),
    );
}
  1. All methods of controller now available as JsonRpc methods

  2. Enjoy!

##Usage Client

$client = new \thefuzz69\JsonRpc\Client('http://url/of/webservice');

$response = $client->someMethod($arg1, $arg2);