| @@ 954-959 (lines=6) @@ | ||
| 951 | $class = '\\Plugin\\'.$config['code'].'\\'.$config['event']; |
|
| 952 | $eventExists = true; |
|
| 953 | ||
| 954 | if (!class_exists($class)) { |
|
| 955 | $this['monolog']->warning("skip {$code} loading. event class not foud.", array( |
|
| 956 | 'class' => $class, |
|
| 957 | )); |
|
| 958 | $eventExists = false; |
|
| 959 | } |
|
| 960 | ||
| 961 | if ($eventExists && file_exists($dir->getRealPath().'/event.yml')) { |
|
| 962 | ||
| @@ 984-989 (lines=6) @@ | ||
| 981 | if (isset($config['service'])) { |
|
| 982 | foreach ($config['service'] as $service) { |
|
| 983 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
|
| 984 | if (!class_exists($class)) { |
|
| 985 | $this['monolog']->warning("skip {$code} loading. service provider class not foud.", array( |
|
| 986 | 'class' => $class, |
|
| 987 | )); |
|
| 988 | continue; |
|
| 989 | } |
|
| 990 | $this->register(new $class($this)); |
|
| 991 | } |
|
| 992 | } |
|