1 | <?php |
||
15 | class Inflector extends \yii\helpers\BaseInflector |
||
16 | { |
||
17 | /** |
||
18 | * From yii/helpers/BaseInflector: |
||
19 | * |
||
20 | * Returns a string with all spaces converted to given replacement, |
||
21 | * non word characters removed and the rest of characters transliterated. |
||
22 | * |
||
23 | * If intl extension isn't available uses fallback that converts latin characters only |
||
24 | * and removes the rest. You may customize characters map via $transliteration property |
||
25 | * of the helper. |
||
26 | * |
||
27 | * @param string $string An arbitrary string to convert |
||
28 | * @param string $replacement The replacement to use for spaces |
||
29 | * @param bool $lowercase whether to return the string in lowercase or not. Defaults to `true`. |
||
30 | * @param bool $transliterate whether to use a transliteration transformation or not. Defaults to `true` (=BaseInflector implementation) |
||
31 | * @return string The converted string. |
||
32 | */ |
||
33 | public static function slug($string, $replacement = '-', $lowercase = true, $transliterate = true) |
||
44 | } |