@@ 246-256 (lines=11) @@ | ||
243 | * |
|
244 | * @throws UnknownProcedureException if the procedure is unknown |
|
245 | */ |
|
246 | public function confirmRegistration($procedureName, $requestId = 1, $registrationId = 1) |
|
247 | { |
|
248 | if (!isset($this->registrations[$procedureName])) { |
|
249 | throw new UnknownProcedureException($procedureName); |
|
250 | } |
|
251 | ||
252 | $futureResult = $this->registrations[$procedureName]; |
|
253 | $result = new RegisteredMessage($requestId, $registrationId); |
|
254 | ||
255 | $futureResult->resolve($result); |
|
256 | } |
|
257 | ||
258 | /** |
|
259 | * Triggers a call to a registered procedure and returns its result. |
|
@@ 301-311 (lines=11) @@ | ||
298 | * |
|
299 | * @throws UnknownProcedureException |
|
300 | */ |
|
301 | public function confirmUnregistration($procedureName, $requestId = 1) |
|
302 | { |
|
303 | if (!isset($this->unregistrations[$procedureName])) { |
|
304 | throw new UnknownProcedureException($procedureName); |
|
305 | } |
|
306 | ||
307 | $futureResult = $this->unregistrations[$procedureName]; |
|
308 | $result = new UnregisteredMessage($requestId); |
|
309 | ||
310 | $futureResult->resolve($result); |
|
311 | } |
|
312 | ||
313 | /** |
|
314 | * Call. |