| @@ 876-881 (lines=6) @@ | ||
| 873 | $class = '\\Plugin\\'.$config['code'].'\\'.$config['event']; |
|
| 874 | $eventExists = true; |
|
| 875 | ||
| 876 | if (!class_exists($class)) { |
|
| 877 | $this['monolog']->warning("skip {$code} loading. event class not foud.", array( |
|
| 878 | 'class' => $class, |
|
| 879 | )); |
|
| 880 | $eventExists = false; |
|
| 881 | } |
|
| 882 | ||
| 883 | if ($eventExists && isset($config['event'])) { |
|
| 884 | ||
| @@ 906-911 (lines=6) @@ | ||
| 903 | if (isset($config['service'])) { |
|
| 904 | foreach ($config['service'] as $service) { |
|
| 905 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
|
| 906 | if (!class_exists($class)) { |
|
| 907 | $this['monolog']->warning("skip {$code} loading. service provider class not foud.", array( |
|
| 908 | 'class' => $class, |
|
| 909 | )); |
|
| 910 | continue; |
|
| 911 | } |
|
| 912 | $this->register(new $class($this)); |
|
| 913 | } |
|
| 914 | } |
|