diff options
Diffstat (limited to 'Digitigrade/RpcReceiver.php')
| -rw-r--r-- | Digitigrade/RpcReceiver.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Digitigrade/RpcReceiver.php b/Digitigrade/RpcReceiver.php new file mode 100644 index 0000000..f776bf2 --- /dev/null +++ b/Digitigrade/RpcReceiver.php @@ -0,0 +1,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); +}
\ No newline at end of file |
