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