| @@ 907-912 (lines=6) @@ | ||
| 904 | $class = '\\Plugin\\'.$config['code'].'\\'.$config['event']; |
|
| 905 | $eventExists = true; |
|
| 906 | ||
| 907 | if (!class_exists($class)) { |
|
| 908 | $this['monolog']->warning("skip {$code} loading. event class not foud.", array( |
|
| 909 | 'class' => $class, |
|
| 910 | )); |
|
| 911 | $eventExists = false; |
|
| 912 | } |
|
| 913 | ||
| 914 | if ($eventExists && file_exists($dir->getRealPath().'/event.yml')) { |
|
| 915 | ||
| @@ 937-942 (lines=6) @@ | ||
| 934 | if (isset($config['service'])) { |
|
| 935 | foreach ($config['service'] as $service) { |
|
| 936 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
|
| 937 | if (!class_exists($class)) { |
|
| 938 | $this['monolog']->warning("skip {$code} loading. service provider class not foud.", array( |
|
| 939 | 'class' => $class, |
|
| 940 | )); |
|
| 941 | continue; |
|
| 942 | } |
|
| 943 | $this->register(new $class($this)); |
|
| 944 | } |
|
| 945 | } |
|