| @@ 90-100 (lines=11) @@ | ||
| 87 | * |
|
| 88 | * @return object the gateway instance |
|
| 89 | */ |
|
| 90 | public function createGateway($config, $defaultClass = false) |
|
| 91 | { |
|
| 92 | $args = [ |
|
| 93 | $this->getRequestChannel($config), |
|
| 94 | $this->getReplyChannel($config), |
|
| 95 | ]; |
|
| 96 | $defaultClass = $defaultClass ? $defaultClass : '\PEIP\Gateway\SimpleMessagingGateway'; |
|
| 97 | $gateway = $this->buildAndModify($config, $args, $defaultClass); |
|
| 98 | $id = (string) $config['id']; |
|
| 99 | $this->gateways[$id] = $gateway; |
|
| 100 | ||
| 101 | return $gateway; |
|
| 102 | } |
|
| 103 | ||
| @@ 514-524 (lines=11) @@ | ||
| 511 | * |
|
| 512 | * @return object the gateway instance |
|
| 513 | */ |
|
| 514 | public function createGateway($config, $defaultClass = false) |
|
| 515 | { |
|
| 516 | $args = [ |
|
| 517 | $this->getRequestChannel($config), |
|
| 518 | $this->getReplyChannel($config), |
|
| 519 | ]; |
|
| 520 | $defaultClass = $defaultClass ? $defaultClass : 'SimpleMessagingGateway'; |
|
| 521 | $gateway = $this->buildAndModify($config, $args, $defaultClass); |
|
| 522 | $id = (string) $config['id']; |
|
| 523 | $this->gateways[$id] = $gateway; |
|
| 524 | ||
| 525 | return $gateway; |
|
| 526 | } |
|
| 527 | ||