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