| @@ 414-425 (lines=12) @@ | ||
| 411 | } |
|
| 412 | } |
|
| 413 | // call instance methods |
|
| 414 | if ($config->action) { |
|
| 415 | foreach ($config->action as $action) { |
|
| 416 | $method = (string) $action['method'] != '' ? (string) $action['method'] : null; |
|
| 417 | if ($method && self::hasPublicProperty($service, 'Method', $method)) { |
|
| 418 | $args = []; |
|
| 419 | foreach ($action->children() as $argument) { |
|
| 420 | $args[] = $this->buildArg($argument); |
|
| 421 | } |
|
| 422 | call_user_func_array([$service, (string) $action['method']], $args); |
|
| 423 | } |
|
| 424 | } |
|
| 425 | } |
|
| 426 | // register instance listeners |
|
| 427 | if ($service instanceof \PEIP\INF\Event\Connectable) { |
|
| 428 | if ($config->listener) { |
|
| @@ 196-207 (lines=12) @@ | ||
| 193 | } |
|
| 194 | } |
|
| 195 | // call instance methods |
|
| 196 | if (isset($config->action)) { |
|
| 197 | foreach ($config->action as $action) { |
|
| 198 | $method = (string) $action['method'] != '' ? (string) $action['method'] : null; |
|
| 199 | if ($method && self::hasPublicProperty($service, 'Method', $method)) { |
|
| 200 | $args = []; |
|
| 201 | foreach ($action->children() as $argument) { |
|
| 202 | $args[] = self::buildArg($argument); |
|
| 203 | } |
|
| 204 | call_user_func_array([$service, (string) $action['method']], $args); |
|
| 205 | } |
|
| 206 | } |
|
| 207 | } |
|
| 208 | // register instance listeners |
|
| 209 | if ($service instanceof \PEIP\INF\Event\Connectable) { |
|
| 210 | if (isset($config->listener)) { |
|