| @@ 592-604 (lines=13) @@ | ||
| 589 | * @param string $defaultClass the class to use if none is set in config. |
|
| 590 | * @return object the service-activator instance |
|
| 591 | */ |
|
| 592 | public function createServiceActivator($config, $defaultClass = false){
|
|
| 593 | $method = (string)$config['method']; |
|
| 594 | $service = $this->getService((string)$config['ref']); |
|
| 595 | if($method && $service){
|
|
| 596 | $args = $this->getReplyHandlerArguments($config); |
|
| 597 | array_unshift($args,array( |
|
| 598 | $service, |
|
| 599 | $method |
|
| 600 | )); |
|
| 601 | $defaultClass = $defaultClass ? $defaultClass : 'ServiceActivator'; |
|
| 602 | return $this->buildAndModify($config, $args, $defaultClass); |
|
| 603 | } |
|
| 604 | } |
|
| 605 | ||
| 606 | ||
| 607 | /** |
|
| @@ 196-208 (lines=13) @@ | ||
| 193 | * @param string $defaultClass the class to use if none is set in config. |
|
| 194 | * @return object the service-activator instance |
|
| 195 | */ |
|
| 196 | public function createServiceActivator($config, $defaultClass = false){
|
|
| 197 | $method = (string)$config['method']; |
|
| 198 | $service = $this->context->getServiceProvider()->provideService((string)$config['ref']); |
|
| 199 | if($method && $service){
|
|
| 200 | $args = $this->getReplyHandlerArguments($config); |
|
| 201 | array_unshift($args,array( |
|
| 202 | $service, |
|
| 203 | $method |
|
| 204 | )); |
|
| 205 | $defaultClass = $defaultClass ? $defaultClass : '\PEIP\Service\ServiceActivator'; |
|
| 206 | return $this->buildAndModify($config, $args, $defaultClass); |
|
| 207 | } |
|
| 208 | } |
|
| 209 | ||
| 210 | ||
| 211 | /** |
|