| @@ 914-919 (lines=6) @@ | ||
| 911 | $class = '\\Plugin\\'.$config['code'].'\\'.$config['event']; |
|
| 912 | $eventExists = true; |
|
| 913 | ||
| 914 | if (!class_exists($class)) { |
|
| 915 | $this['monolog']->warning("skip {$code} loading. event class not foud.", array( |
|
| 916 | 'class' => $class, |
|
| 917 | )); |
|
| 918 | $eventExists = false; |
|
| 919 | } |
|
| 920 | ||
| 921 | if ($eventExists && file_exists($dir->getRealPath().'/event.yml')) { |
|
| 922 | ||
| @@ 944-949 (lines=6) @@ | ||
| 941 | if (isset($config['service'])) { |
|
| 942 | foreach ($config['service'] as $service) { |
|
| 943 | $class = '\\Plugin\\'.$config['code'].'\\ServiceProvider\\'.$service; |
|
| 944 | if (!class_exists($class)) { |
|
| 945 | $this['monolog']->warning("skip {$code} loading. service provider class not foud.", array( |
|
| 946 | 'class' => $class, |
|
| 947 | )); |
|
| 948 | continue; |
|
| 949 | } |
|
| 950 | $this->register(new $class($this)); |
|
| 951 | } |
|
| 952 | } |
|