1 | <?php |
||
24 | class XMLRPC_Async_Call { |
||
25 | |||
26 | /** |
||
27 | * Hold the IXR Clients that will be dispatched at shutdown |
||
28 | * |
||
29 | * Clients are stored in the following schema: |
||
30 | * [ |
||
31 | * $blog_id => [ |
||
32 | * $user_id => [ |
||
33 | * arrat of Jetpack_IXR_ClientMulticall |
||
34 | * ] |
||
35 | * ] |
||
36 | * ] |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | public static $clients = array(); |
||
41 | |||
42 | /** |
||
43 | * Adds a new XMLRPC call to the queue to be processed on shutdown |
||
44 | * |
||
45 | * @param string $method The XML-RPC method. |
||
46 | * @param integer $user_id The user ID used to make the request (will use this user's token); Use 0 for the blog token. |
||
47 | * @param mixed ...$args This function accepts any number of additional arguments, that will be passed to the call. |
||
48 | * @return void |
||
49 | */ |
||
50 | public static function add_call( $method, $user_id = 0, ...$args ) { |
||
75 | |||
76 | /** |
||
77 | * Trigger the calls at shutdown |
||
78 | * |
||
79 | * @return void |
||
80 | */ |
||
81 | public static function do_calls() { |
||
105 | } |
||
106 |