| @@ 936-941 (lines=6) @@ | ||
| 933 | $class = '\\Plugin\\'.$config['code'].'\\'.$config['event']; |
|
| 934 | $eventExists = true; |
|
| 935 | ||
| 936 | if (!class_exists($class)) { |
|
| 937 | $this['monolog']->warning("skip {$code} loading. event class not foud.", array( |
|
| 938 | 'class' => $class, |
|
| 939 | )); |
|
| 940 | $eventExists = false; |
|
| 941 | } |
|
| 942 | ||
| 943 | if ($eventExists && file_exists($dir->getRealPath().'/event.yml')) { |
|
| 944 | ||
| @@ 966-971 (lines=6) @@ | ||
| 963 | if (isset($config['service'])) { |
|
| 964 | foreach ($config['service'] as $service) { |
|
| 965 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
|
| 966 | if (!class_exists($class)) { |
|
| 967 | $this['monolog']->warning("skip {$code} loading. service provider class not foud.", array( |
|
| 968 | 'class' => $class, |
|
| 969 | )); |
|
| 970 | continue; |
|
| 971 | } |
|
| 972 | $this->register(new $class($this)); |
|
| 973 | } |
|
| 974 | } |
|