@@ 486-496 (lines=11) @@ | ||
483 | * @param string $defaultClass the class to use if none is set in config. |
|
484 | * @return object the gateway instance |
|
485 | */ |
|
486 | public function createGateway($config, $defaultClass = false){ |
|
487 | $args = array( |
|
488 | $this->getRequestChannel($config), |
|
489 | $this->getReplyChannel($config) |
|
490 | ); |
|
491 | $defaultClass = $defaultClass ? $defaultClass : 'SimpleMessagingGateway'; |
|
492 | $gateway = $this->buildAndModify($config, $args, $defaultClass); |
|
493 | $id = (string)$config["id"]; |
|
494 | $this->gateways[$id] = $gateway; |
|
495 | return $gateway; |
|
496 | } |
|
497 | ||
498 | /** |
|
499 | * Creates and registers router from a configuration object. |
@@ 90-100 (lines=11) @@ | ||
87 | * @param string $defaultClass the class to use if none is set in config. |
|
88 | * @return object the gateway instance |
|
89 | */ |
|
90 | public function createGateway($config, $defaultClass = false){ |
|
91 | $args = array( |
|
92 | $this->getRequestChannel($config), |
|
93 | $this->getReplyChannel($config) |
|
94 | ); |
|
95 | $defaultClass = $defaultClass ? $defaultClass : '\PEIP\Gateway\SimpleMessagingGateway'; |
|
96 | $gateway = $this->buildAndModify($config, $args, $defaultClass); |
|
97 | $id = (string)$config["id"]; |
|
98 | $this->gateways[$id] = $gateway; |
|
99 | return $gateway; |
|
100 | } |
|
101 | ||
102 | /** |
|
103 | * Creates and registers router from a configuration object. |