@@ -24,11 +24,17 @@ |
||
24 | 24 | return method_exists(Yii::class, 'autoload'); |
25 | 25 | } |
26 | 26 | |
27 | + /** |
|
28 | + * @return string |
|
29 | + */ |
|
27 | 30 | public static function bad2sep($str, $separator = '-') |
28 | 31 | { |
29 | 32 | return preg_replace('/[^a-zA-Z0-9-]/', $separator, $str); |
30 | 33 | } |
31 | 34 | |
35 | + /** |
|
36 | + * @param string $id |
|
37 | + */ |
|
32 | 38 | public static function id2camel($id, $separator = '-') |
33 | 39 | { |
34 | 40 | return Inflector::id2camel(self::bad2sep($id, $separator), $separator); |