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