| Conditions | 5 |
| Paths | 14 |
| Total Lines | 16 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | public static function create($conf) |
||
| 26 | { |
||
| 27 | $name=$conf["name"]; |
||
| 28 | $monitorProvider="Monitor"; |
||
| 29 | try { |
||
| 30 | $BabelConfig=json_decode(file_get_contents(babel_path("Extension/$name/babel.json")), true); |
||
| 31 | $monitorProvider=$BabelConfig["provider"]["monitor"]; |
||
| 32 | } catch (Throwable $e) { |
||
| 33 | } catch (ErrorException $e) { |
||
| 34 | } catch (Exception $e) { |
||
| 35 | } |
||
| 36 | $className = "App\\Babel\\Extension\\$name\\$monitorProvider"; |
||
| 37 | if (class_exists($className)) { |
||
| 38 | return new $className(); |
||
| 39 | } else { |
||
| 40 | return null; |
||
| 41 | } |
||
| 44 |