|
@@ 182-192 (lines=11) @@
|
| 179 |
|
* |
| 180 |
|
* @throws UnknownProcedureException if the procedure is unknown |
| 181 |
|
*/ |
| 182 |
|
public function confirmRegistration($procedureName, $requestId = 1, $registrationId = 1) |
| 183 |
|
{ |
| 184 |
|
if (!isset($this->registrations[$procedureName])) { |
| 185 |
|
throw new UnknownProcedureException($procedureName); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
$futureResult = $this->registrations[$procedureName]; |
| 189 |
|
$result = new RegisteredMessage($requestId, $registrationId); |
| 190 |
|
|
| 191 |
|
$futureResult->resolve($result); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
/** |
| 195 |
|
* Triggers a call to a registered procedure and returns its result. |
|
@@ 239-249 (lines=11) @@
|
| 236 |
|
* |
| 237 |
|
* @throws UnknownProcedureException |
| 238 |
|
*/ |
| 239 |
|
public function confirmUnregistration($procedureName, $requestId = 1) |
| 240 |
|
{ |
| 241 |
|
if (!isset($this->unregistrations[$procedureName])) { |
| 242 |
|
throw new UnknownProcedureException($procedureName); |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
$futureResult = $this->unregistrations[$procedureName]; |
| 246 |
|
$result = new UnregisteredMessage($requestId); |
| 247 |
|
|
| 248 |
|
$futureResult->resolve($result); |
| 249 |
|
} |
| 250 |
|
|
| 251 |
|
/** |
| 252 |
|
* Call. |