1 | <?php |
||
5 | class StringUtils |
||
6 | { |
||
7 | /** |
||
8 | * Return the translation pattern with keys "{admin}" and "{key}" replaced by their values. |
||
9 | * |
||
10 | * @param string $translationPattern |
||
11 | * @param string $adminName |
||
12 | * @param string $key |
||
13 | * |
||
14 | * @return string |
||
15 | */ |
||
16 | public static function getTranslationKey( |
||
26 | |||
27 | /** |
||
28 | * Return the translation pattern with keys "{admin}" and "{key}" replaced by their values. |
||
29 | * |
||
30 | * @param string $translationPattern |
||
31 | * @param string $adminName |
||
32 | * @param string $actionName |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | public static function getActionTranslationKey( |
||
46 | |||
47 | /** |
||
48 | * Camelize a string. |
||
49 | * |
||
50 | * @param string $id A string to camelize |
||
51 | * |
||
52 | * @return string The camelized string |
||
53 | */ |
||
54 | public static function camelize($id): string |
||
58 | |||
59 | /** |
||
60 | * A string to underscore. |
||
61 | * |
||
62 | * @param string $id The string to underscore |
||
63 | * |
||
64 | * @return string The underscored string |
||
65 | */ |
||
66 | public static function underscore($id): string |
||
78 | |||
79 | /** |
||
80 | * Return true if the given string starts with $start. |
||
81 | * |
||
82 | * @param string $string |
||
83 | * @param string $start |
||
84 | * |
||
85 | * @return bool |
||
86 | */ |
||
87 | public static function startWith(string $string, string $start): bool |
||
91 | } |
||
92 |