Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | private static function buildConnector($type) |
||
26 | { |
||
27 | $type = strtolower($type); |
||
28 | if (!isset(self::$types[$type])) { |
||
29 | throw new \Exception('错误的通知类型:'.$type); |
||
30 | } |
||
31 | |||
32 | $class = false !== strpos($type, '\\') ? $type : '\\Dongdavid\\Notify\\sender\\'.self::$types[$type]; |
||
33 | |||
34 | return new $class(); |
||
35 | } |
||
49 |