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
Requires
- php: >=5.4.0
- yiisoft/yii2: *
README
JsonRpc Server and Client for Yii2
##Usage Server
- Install with Composer
"require": { "thefuzz69/yii2-json-rpc": "*", }, php composer.phar update
- Add action to controller
public function actions() { return array( 'index' => array( 'class' => '\thefuzz69\JsonRpc\Action', ), ); }
-
All methods of controller now available as JsonRpc methods
-
Enjoy!
##Usage Client
$client = new \thefuzz69\JsonRpc\Client('http://url/of/webservice'); $response = $client->someMethod($arg1, $arg2);