@@ 169-179 (lines=11) @@ | ||
166 | * |
|
167 | * @throws UnknownProcedureException if the procedure is unknown. |
|
168 | */ |
|
169 | public function confirmRegistration($procedureName, $requestId = 1, $registrationId = 1) |
|
170 | { |
|
171 | if (!isset($this->registrations[$procedureName])) { |
|
172 | throw new UnknownProcedureException($procedureName); |
|
173 | } |
|
174 | ||
175 | $futureResult = $this->registrations[$procedureName]; |
|
176 | $result = new RegisteredMessage($requestId, $registrationId); |
|
177 | ||
178 | $futureResult->resolve($result); |
|
179 | } |
|
180 | ||
181 | /** |
|
182 | * Triggers a call to a registered procedure and returns its result. |
|
@@ 226-236 (lines=11) @@ | ||
223 | * |
|
224 | * @throws UnknownProcedureException |
|
225 | */ |
|
226 | public function confirmUnregistration($procedureName, $requestId = 1) |
|
227 | { |
|
228 | if (!isset($this->unregistrations[$procedureName])) { |
|
229 | throw new UnknownProcedureException($procedureName); |
|
230 | } |
|
231 | ||
232 | $futureResult = $this->unregistrations[$procedureName]; |
|
233 | $result = new UnregisteredMessage($requestId); |
|
234 | ||
235 | $futureResult->resolve($result); |
|
236 | } |
|
237 | ||
238 | /** |
|
239 | * Call. |