blob: f776bf29e01b95c880f584b2b4b0a9ec1ffafa7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
namespace Digitigrade;
/**
* Describes an object that can be acted on via an abstract RPC interface.
*
* If the object comes from a remote server, it will be contacted to complete the call,
* whereas if it is a local object, the call may be completed using regular function calls.
*/
interface RpcReceiver {
/**
* Makes a remote or local method call on this object.
*
* Implementors should not expose this method publicly, but should instead create wrapper
* methods with a nicer interface.
* @param string $method the name of the remote method to call
* @param array $args any arguments
* @return mixed results of the call
* @throws RpcException if there was an error contacting the other server
*/
protected function rpcCall(string $method, array $args);
}
|