src/ABS/Service/ServiceActivator.php 1 location
|
@@ 57-67 (lines=11) @@
|
| 54 |
|
* |
| 55 |
|
* @return mixed result of calling the registered service callable with message content/payload |
| 56 |
|
*/ |
| 57 |
|
protected function callService(\PEIP\INF\Message\Message $message) |
| 58 |
|
{ |
| 59 |
|
$res = null; |
| 60 |
|
if (is_callable($this->serviceCallable)) { |
| 61 |
|
$res = call_user_func($this->serviceCallable, $message->getContent()); |
| 62 |
|
} else { |
| 63 |
|
if (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) { |
| 64 |
|
$res = $this->serviceCallable->handle($message->getContent()); |
| 65 |
|
} |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
return $res; |
| 69 |
|
} |
| 70 |
|
} |
src/Service/HeaderServiceActivator.php 1 location
|
@@ 40-50 (lines=11) @@
|
| 37 |
|
* |
| 38 |
|
* @return mixed result of calling the registered service callable with message content/payload |
| 39 |
|
*/ |
| 40 |
|
protected function callService(\PEIP\INF\Message\Message $message) |
| 41 |
|
{ |
| 42 |
|
$res = null; |
| 43 |
|
if (is_callable($this->serviceCallable)) { |
| 44 |
|
$res = call_user_func($this->serviceCallable, $message->getHeader($this->headerName)); |
| 45 |
|
} else { |
| 46 |
|
if (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) { |
| 47 |
|
$res = $this->serviceCallable->handle($message->getHeader($this->headerName)); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
return $res; |
| 52 |
|
} |
| 53 |
|
} |